This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
dragengine:modules:dragonscript:abstractions [2020/05/05 20:14] – dragonlord | dragengine:modules:dragonscript:abstractions [2020/05/05 20:17] – dragonlord | ||
---|---|---|---|
Line 71: | Line 71: | ||
| | ||
// create collider which is used for physical interaction. in most situations you want to | // create collider which is used for physical interaction. in most situations you want to | ||
- | // animated | + | // animate |
collider = ECBehaviorCollider.new(this, | collider = ECBehaviorCollider.new(this, | ||
| | ||
// create head lights. attached to collider with id " | // create head lights. attached to collider with id " | ||
headLightLeft = ECBehaviorLight.new(this, | headLightLeft = ECBehaviorLight.new(this, | ||
- | headLightLeft.getLight().getColor().setColor(Color.YELLOW) | + | headLightLeft.getLight().getColor().setColor(Color.yellow) |
headLightLeft.getAttach().getPosition().setVector(Vector.new(-1, | headLightLeft.getAttach().getPosition().setVector(Vector.new(-1, | ||
| | ||
headLightRight = ECBehaviorLight.new(this, | headLightRight = ECBehaviorLight.new(this, | ||
- | headLightRight.getLight().getColor().setColor(Color.YELLOW) | + | headLightRight.getLight().getColor().setColor(Color.yellow) |
headLightRight.getAttach().getPosition().setVector(Vector.new(1, | headLightRight.getAttach().getPosition().setVector(Vector.new(1, | ||
| | ||
Line 93: | Line 93: | ||
| | ||
// create behavior moving collider on rail. the mapper defines what rail to use. | // create behavior moving collider on rail. the mapper defines what rail to use. | ||
- | // if you assign also the trigger | + | // if you assign also the trigger |
// can use triggers to start/stop moving the train. if you want to control this | // can use triggers to start/stop moving the train. if you want to control this | ||
// on your own (or by other behaviors only) leave out this argument | // on your own (or by other behaviors only) leave out this argument | ||
- | moveOnRail = ECBehaviorMoveOnRail.new(this, | + | moveOnRail = ECBehaviorMoveOnRail.new(this, |
end | end | ||
end | end |