Package controller

Class ReboundController

java.lang.Object
controller.ObjectController
controller.ReboundController

public class ReboundController extends controller.ObjectController
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Is called once every game time step by the game itself.

    Methods inherited from class controller.ObjectController

    applySpeedVector, getPlayground, getTimestep, getVX, getVY, getX, getY, setDummy, setObject, setPlayground, setVX, setVY, setX, setY

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ReboundController

      public ReboundController()
  • Method Details

    • updateObject

      public void updateObject()
      Description copied from class: controller.ObjectController
      Is called once every game time step by the game itself. NEVER call this directly, not necessary!
      The method can do whatever it likes, including nothing. The attribute ObjectController.gameObject contains a reference to the controlled object, which allows access to the Playground the object belongs to (useful for getting the pixel size in x and y of the playing field.
      Recommended: when implementing this method, call at the end ObjectController.applySpeedVector() method. This is a helper method that sets the new x,y coordinates for the ObjectController.gameObject correctly.
      Specified by:
      updateObject in class controller.ObjectController