Class Frog


public class Frog extends GameObject
GameObject which run away from snake.
  • Field Summary

    Fields inherited from class GameObject

    game, timer
  • Constructor Summary

    Constructors
    Constructor
    Description
    Frog​(Board board)
    Constructor pass reference to frog.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Like unity Awake (invoke on create of object or create gameplay).
    protected void
    Like unity OnDestroy (invoke after destroy object or on end of game).
    protected void
    Method who render a object on screen (invoke on begin of each frames).
    protected void
    Like unity Start (invoke on first frame of object like or before begin main loop).
    protected void
    Like unity Update (invoke after render on each frames).

    Methods inherited from class GameObject

    getDeltaTime, setTimer, timerClockDown

    Methods inherited from class java.lang.Object

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

    • Frog

      public Frog(Board board)
      Constructor pass reference to frog.
  • Method Details

    • awake

      protected void awake()
      Description copied from class: GameObject
      Like unity Awake (invoke on create of object or create gameplay).
      Overrides:
      awake in class GameObject
    • 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
    • onDestroy

      protected void onDestroy()
      Description copied from class: GameObject
      Like unity OnDestroy (invoke after destroy object or on end of game).
      Overrides:
      onDestroy in class GameObject
    • render

      protected void render(Graphics2D g)
      Description copied from class: GameObject
      Method who render a object on screen (invoke on begin of each frames).
      Overrides:
      render in class GameObject