Class FruitGenerator


public class FruitGenerator extends GameObject
Class generate fruit on random position.
  • Constructor Details

    • FruitGenerator

      public FruitGenerator(Board board, int maxFruits, float secondsBetweenFruits)
      Constructor pass reference to board, set max fruits quantity and interwals of time between new fruits spawn.
  • Method Details

    • DecreaseCounter

      public void DecreaseCounter()
      Decrease counter.
    • start

      protected void start()
      Description copied from class: GameObject
      Like unity Start (invoke on first frame of object like or before begin main loop).
      Overrides:
      start in class GameObject
    • update

      protected void update()
      Description copied from class: GameObject
      Like unity Update (invoke after render on each frames).
      Overrides:
      update in class GameObject