![]() For example, you might want to have the player in your game be able to eat 5 different food sprites, so combining them into a single ||sprites:kind|| allows you to write the code for a single section. We can have sprites in our games that represent many different things - players, enemies, coins, food, or anything else you might want to represent in your games.Ĭreating labels ( ||sprites:kind||s) for different groups of sprites helps us assign them each unique behaviors. We use ||sprites:kind|| to classify our sprites. ||sprites:ghost on|| and ||sprites:ghost off||.||sprites:on overlap|| event with different ||sprites:kind||.In this activity, students will be introduced to: We can assign events to overlaps between sprites of different (or even the same) ||sprites:kind||, adding behaviors such as scoring points, destroying an object, starting an animation, and much more. ![]() Overlap is the primary way in which we can make sprites interact with each other. ![]() Once the sprites are moving, the next step is to detect when they interact with other objects. Activity: Sprite Overlap & Events - Part 1 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |