-
Book Overview & Buying
-
Table Of Contents
Mastering AndEngine Game Development
By :
Constraints are another important part—and often an essential part—of a functional world. Imagine, for example, a gun turret that should be allowed to rotate within only a certain angle while always looking at the player. A lookAt constraint would take care of the latter, while putting a constraint on the number of degrees up to which the turret can rotate would take care of the former.
Exactly how these constraints are implemented depends on the type of scene file you use. With a TMX tile map, it will likely be a tile property. With AndEngine's XML files based on LevelLoader, you can define custom parameters to limit things such as rotation, or have a lookAt parameter to always point towards another object, like a sprite.
Change the font size
Change margin width
Change background colour