Uses of Class
gameobjects.GameObject
Packages that use 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
Fields in collider declared as GameObjectModifier and TypeFieldDescriptionprotected GameObject
Collider.gameobject
GameObject it belongs toMethods in collider with parameters of type GameObjectModifier and TypeMethodDescriptionvoid
Collider.setObject
(GameObject gameObject) setter for corresponding GameObjectConstructors in collider with parameters of type 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
Fields in controller declared as GameObjectMethods in controller with parameters of type GameObjectModifier 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
Subclasses of GameObject in gameobjectsModifier and TypeClassDescriptionclass
class
class
class
A rectangle object.class
Convenience Class subclassingGameObject
, directly instanciatingTextArtist
a subclass ofArtist
that draws a text.Methods in gameobjects that return GameObjectModifier 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) Methods in gameobjects with parameters of type GameObjectModifier 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
Fields in playground declared as GameObjectModifier and TypeFieldDescriptionprotected GameObject
BreakoutLevelBase.ball
instance of the ball, needs to be set byBreakoutLevelBase.prepareLevel(String)
protected GameObject
BreakoutLevelBase.ego
instance of the ball, needs to be set byBreakoutLevelBase.prepareLevel(String)
Fields in playground with type parameters of type GameObjectModifier and TypeFieldDescription(package private) LinkedList<GameObject>
Playground.addables
protected static HashMap<String,
GameObject> Playground.gameObjects
only one set of objects exists concurrently so this can be staticMethods in playground that return GameObjectModifier and TypeMethodDescriptionprotected GameObject
BreakoutLevel0.createBall()
protected GameObject
BreakoutLevel1.createBall()
This method creates a new ball.protected GameObject
BreakoutLevel2.createBall()
protected abstract GameObject
BreakoutLevelBase.createBall()
Creates the ball object and returns it, called by #prepareLevel.protected GameObject
BreakoutLevel0.createBrick
(int row, int column) creates one brick.protected GameObject
BreakoutLevel1.createBrick
(int row, int column) This method creates a new brick.protected GameObject
BreakoutLevel2.createBrick
(int row, int column) protected abstract GameObject
BreakoutLevelBase.createBrick
(int row, int column) Creates the GameObject (RectObject) instance representing a single brick at a certain grid position.protected GameObject
BreakoutLevel0.createEgoObject()
protected GameObject
BreakoutLevel1.createEgoObject()
This method creates a new RectObject.protected GameObject
BreakoutLevel2.createEgoObject()
protected abstract GameObject
BreakoutLevelBase.createEgoObject()
Creates the ego object and returns it, called byBreakoutLevelBase.prepareLevel(java.lang.String)
.protected GameObject
LevelBoss.createEnemyShotObject
(GameObject parentObject, String name, ObjectController limitedTimeController) protected GameObject
SpaceInvadersLevel.createEnemyShotObject
(GameObject parentObject, String name, ObjectController limitedTimeController) (package private) GameObject
SpaceInvadersLevel.createSingleCollect
(String name) protected GameObject
Level3.createSingleEnemy
(String name, double x_enemy, double y_enemy, double vx_enemy, double vy_enemy, ObjectController enemyController, double gameTime) protected GameObject
LevelBoss.createSingleEnemy
(String name, double x_enemy, double y_enemy, double vx_enemy, double vy_enemy, ObjectController enemyController, double gameTime) (package private) GameObject
SpaceInvadersLevel.createSingleEnemy
(String name, double x_enemy, double y_enemy, double vx_enemy, double vy_enemy, ObjectController enemyController, double gameTime) Retrieves a graphics object by name.Methods in playground that return types with arguments of type GameObjectModifier and TypeMethodDescriptionPlayground.collectObjects
(String substr, boolean filterInactive) Puts objects with a certain substring in their name into a LinkedLisrt and returns them.Methods in playground with parameters of type GameObjectModifier and TypeMethodDescriptionprotected void
BreakoutLevel0.actionIfBallHitsBrick
(GameObject ball, GameObject brick) lets ball bounce in Y direction, deletes brick.protected void
BreakoutLevel1.actionIfBallHitsBrick
(GameObject ball, GameObject brick) This method defines the behavior when the ball hits a brick.protected void
BreakoutLevel2.actionIfBallHitsBrick
(GameObject ball, GameObject brick) protected void
BreakoutLevel3.actionIfBallHitsBrick
(GameObject ball, GameObject brick) protected abstract void
BreakoutLevelBase.actionIfBallHitsBrick
(GameObject ball, GameObject brick) Method that gets called by applyGameLogic() whenever the ball collides with a brick.protected void
BreakoutLevel0.actionIfBallHitsEgo
(GameObject ball, GameObject ego) Let the ball bounce off in Y direction.protected void
BreakoutLevel1.actionIfBallHitsEgo
(GameObject ball, GameObject ego) This method defines the behavior when the ball hits the EgoObject.protected void
BreakoutLevel2.actionIfBallHitsEgo
(GameObject ball, GameObject ego) protected abstract void
BreakoutLevelBase.actionIfBallHitsEgo
(GameObject ball, GameObject ego) Method that gets called by applyGameLogic() whenever the ball collides with the ego object.(package private) void
SpaceInvadersLevel.actionIfEgoCollidesWithCollect
(GameObject collect, GameObject ego) implements game behavior if ego object of player touches a collectableGameObject
.(package private) void
LevelMovingHitObjects.actionIfEgoCollidesWithEnemy
(GameObject enemy, GameObject ego) (package private) void
SpaceInvadersLevel.actionIfEgoCollidesWithEnemy
(GameObject enemy, GameObject ego) implements behaviour of game when ego object is touching an enemy.(package private) void
SpaceInvadersLevel.actionIfEgoObjectIsHit
(GameObject eshot, GameObject ego) implements what happens if the eog object of player is hit by a shot.(package private) void
Level4.actionIfEnemyIsHit
(GameObject e, GameObject shot) (package private) void
Level5to7.actionIfEnemyIsHit
(GameObject e, GameObject shot) (package private) void
LevelBoss.actionIfEnemyIsHit
(GameObject e, GameObject shot) (package private) void
LevelHitTwice.actionIfEnemyIsHit
(GameObject e, GameObject shot) (package private) void
SpaceInvadersLevel.actionIfEnemyIsHit
(GameObject e, GameObject shot) implements game behavior if an enemy object is hit by a players' shot.void
Playground.addObject
(GameObject o) Adds a graphics object to a level.void
Playground.addObjectNow
(GameObject o) Adds a graphics object to a level.protected void
SpaceInvadersLevel.createEnemyShot
(GameObject e) protected GameObject
LevelBoss.createEnemyShotObject
(GameObject parentObject, String name, ObjectController limitedTimeController) protected GameObject
SpaceInvadersLevel.createEnemyShotObject
(GameObject parentObject, String name, ObjectController limitedTimeController) (package private) void
SpaceInvadersLevel.createExplosion
(double gameTime, GameObject e, String basename, double interval, Color color) -
Uses of GameObject in rendering
Fields in rendering declared as GameObjectConstructors in rendering with parameters of type GameObjectModifierConstructorDescriptionAnimationArtist
(GameObject go, Animation anim, double t0, String playmode, double scale) (package private)
Artist
(GameObject go) 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