Uses of Class
gameobjects.GameObject
Package
Description
The package contains classes implementing a 'bounding box' area around game objects.
The controller package contains Object controllers that govern an objects behavior, without being
involved in its collision or drawing properties.
The package gameobjects contains all objects with a visual representation on screen.
The package playground contains all level specific logic and control of level logic.
-
Uses of GameObject in collider
Modifier and TypeMethodDescriptionvoid
Collider.setObject
(GameObject gameObject) setter for corresponding GameObjectModifierConstructorDescriptionCircleCollider
(String id, GameObject o, double radius) Constructor which sets the radius to be respected for collisions.Collider
(String id, GameObject o) RectCollider
(String id, GameObject o, double w, double h) initializes this RectCollider. -
Uses of GameObject in controller
Modifier and TypeMethodDescriptionvoid
EgoController.onDown
(KeyEvent kc, GameObject ego) moves ego down bySpaceInvadersLevel.EGOSPEED
.void
EgoController.onLeft
(KeyEvent kc, GameObject ego) moves ego left bySpaceInvadersLevel.EGOSPEED
.void
EgoController.onRight
(KeyEvent kc, GameObject ego) moves ego right bySpaceInvadersLevel.EGOSPEED
.void
CollisionAwareEgoController.onSpace
(KeyEvent e, GameObject ego) calls superclassEgoController.onSpace(KeyEvent, GameObject)
only, if the time elapsed since last pressing of space is above 0.1 ms.void
EgoController.onSpace
(KeyEvent e, GameObject ego) behavior for shooting on key space.void
EgoController.onStop
(KeyEvent kc, GameObject ego) sets speed to 0.0void
EgoController.onUp
(KeyEvent kc, GameObject ego) moves ego up bySpaceInvadersLevel.EGOSPEED
.void
ObjectController.setObject
(GameObject gameObject) -
Uses of GameObject in gameobjects
Modifier and TypeClassDescriptionclass
class
class
class
A rectangle object.class
Convenience Class subclassingGameObject
, directly instanciatingTextArtist
a subclass ofArtist
that draws a text.Modifier and TypeMethodDescriptionSets the artist to be used for drawing the object onto visible canvas area.GameObject.addController
(ObjectController c) Sets the controller to use for this GameObject's logical behavior.AnimatedGameobject.generateColliders()
EgoObject.generateColliders()
GameObject.generateColliders()
generates and sets collider(s) for this GameObject.GameObject.setActive
(boolean flag) Modifier and TypeMethodDescriptionboolean
GameObject.collisionDetection
(GameObject other) Collision detection implemented by iteration through the own list ofCollider
and calling theirCollider.collidesWith(Collider)
method to check collision with the given parameter instance of otherGameObject
. -
Uses of GameObject in playground
Modifier and TypeMethodDescriptionRetrieves a graphics object by name.Modifier and TypeMethodDescriptionPlayground.collectObjects
(String substr, boolean filterInactive) Puts objects with a certain substring in their name into a LinkedLisrt and returns them.Modifier and TypeMethodDescriptionvoid
Playground.addObject
(GameObject o) Adds a graphics object to a level.void
Playground.addObjectNow
(GameObject o) Adds a graphics object to a level. -
Uses of GameObject in rendering
ModifierConstructorDescriptionAnimationArtist
(GameObject go, Animation anim, double t0, String playmode, double scale) CircleArtist
(GameObject go, double egoRad, Color color) RectArtist
(GameObject go, double width, double height, Color color) TextArtist
(GameObject go, String text, int size, Color textColor) Constructor to intitialize the TextArtist attributes