Package controller

Class FallingStarController

java.lang.Object
controller.ObjectController
controller.FallingStarController

public class FallingStarController extends ObjectController
Controls background stars. When they touch the bottom of the display they reappear on top.
  • Constructor Details

    • FallingStarController

      public FallingStarController()
  • Method Details

    • updateObject

      public void updateObject()
      Description copied from class: 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 ObjectController