Skip to main content

Timelines

5 replies [Last post]
kram
Offline
Joined: 2007-10-23
Points: 0

Hi all, I am trying to get my head around the timeline approach of a game that I want to make in JavaFX. I want a global timeline property that will tick over and that I can inject into my nodes on the screen to move them, etc...

Can anyone help me out here? Doco/examples etc...?

Thanks a heap!
Mark

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alexsch
Offline
Joined: 2007-07-12
Points: 0
kram
Offline
Joined: 2007-10-23
Points: 0

Thanks alex, although thats not really what I meant, but I think I will have to re-think what I actually want :)

On a side note, can I bind the "points" of a polygon to a node?
[code]
points : [b]bind[/b] [ posX, posY,
posX + width / 2, height + posY,
posX - width / 2, height + posY
]
[/code]

so that when I change them via some other action, the polygons points change appropriately?

kram
Offline
Joined: 2007-10-23
Points: 0

Ok I answered my own question... I just needed to cast the points as Numbers

[code]
points : bind [ posX as Number, ...
[/code]

alexsch
Offline
Joined: 2007-07-12
Points: 0

Variables can be defined to have Number type:

var posX = 0.0;

kram
Offline
Joined: 2007-10-23
Points: 0

Thanks Alex, good point