Game Development Reference
In-Depth Information
Projectile Management: Managing the
Attempts
The final step for this chapter is to implement a maximum number of attempts
per scene. You will have some projectiles on the bottom left part of the screen,
and the number will decrease by one after throwing each projectile.
Adding Boundaries
Before going into projectile management, you need to define some walls around
the playing area. As you may have noticed, when you throw projectiles, they fall
and go under the scene, as there is no ground floor. You will create some walls
around the scene. The projectile will collide with the walls.
Open the Scene Editor and create a new actor named ''wall.'' Double-click the
actor to open it in the Actor Editor. In the attributes of the actor, change the
restitution to 0 and uncheck the movable box.
Go back to the Scene Editor. Drag and drop four instances of the Wall actor on
the scene. Change the shape of each of them to position them on the four
borders of the scene, as shown in Figure 6-34.
 
Search WWH ::




Custom Search