Class FruitGenerator
java.lang.Object
GameObject
FruitGenerator
Class generate fruit on random position.
-
Field Summary
Fields inherited from class GameObject
game, timer
-
Constructor Summary
ConstructorDescriptionFruitGenerator(Board board, int maxFruits, float secondsBetweenFruits)
Constructor pass reference to board, set max fruits quantity and interwals of time between new fruits spawn. -
Method Summary
Methods inherited from class GameObject
awake, getDeltaTime, onDestroy, render, setTimer, timerClockDown
-
Constructor Details
-
FruitGenerator
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 classGameObject
-
update
protected void update()Description copied from class:GameObject
Like unity Update (invoke after render on each frames).- Overrides:
update
in classGameObject
-