
13
Changing sprite properties
Changing sprite properties
The next step is to create a behavior script for the sprite where
we check if it’s time to blink. If so, we change the sprite’s cast
member to the appropriate image and set the next blink time.
We also update the time.
Custom sprite properties
Custom sprite properties
•
•
It would be nice if we could store the
It would be nice if we could store the
timing, blink status and blink time in the
timing, blink status and blink time in the
sprite rather than as global variables.
sprite rather than as global variables.
•
•
That would allow us to have more than one
That would allow us to have more than one
blinking tomato on the screen at once!
blinking tomato on the screen at once!
•
•
It is possible to add custom
It is possible to add custom
properties
properties
to
to
sprites.
sprites.
Comentários a estes Manuais