Package controller
package controller
The controller package contains Object controllers that govern an objects behavior, without being
involved in its collision or drawing properties. Object controllers react to user actions/inputs
and govern for example the movement of
Controllers should be designed in such a way that they implement behavior that is level-independent. All level-dependent behavior should be implemented in
GameObject
instances. They can access
their parent objects' properties and, by indirection, the properties and methods of the
associated level. Controllers should be designed in such a way that they implement behavior that is level-independent. All level-dependent behavior should be implemented in
Playground.applyGameLogic()
.-
ClassDescriptionAn EgoController which cannot move through obstacle objects (is collission aware).Controller using key events for up, down, left, right and space (shooting) to control the ego object behavior.This class controls the space invaders.Controls background stars.Controls and abject that is deleted after a lifetime specified in the constructor, and when it leaves the display.Class that controls the LOGICAL behavior of an object independently of how it is displayed or drawn.