Class GameObject
java.lang.Object
GameObject
Game objects class, base of objects on the scenes.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
awake()
Like unity Awake (invoke on create of object or create gameplay).protected float
Like Time.deltaTime in Unity.protected void
Like unity OnDestroy (invoke after destroy object or on end of game).protected void
render(Graphics2D g)
Method who render a object on screen (invoke on begin of each frames).protected void
setTimer(float milliseconds)
Set timer in milliseconds.protected void
start()
Like unity Start (invoke on first frame of object like or before begin main loop).protected boolean
Clock down timer.protected void
update()
Like unity Update (invoke after render on each frames).
-
Field Details
-
game
Reference to gameplay. -
timer
protected float timerTimer value.
-
-
Constructor Details
-
GameObject
public GameObject()
-
-
Method Details
-
getDeltaTime
protected float getDeltaTime()Like Time.deltaTime in Unity. -
setTimer
protected void setTimer(float milliseconds)Set timer in milliseconds. -
timerClockDown
protected boolean timerClockDown()Clock down timer. -
awake
protected void awake()Like unity Awake (invoke on create of object or create gameplay). -
start
protected void start()Like unity Start (invoke on first frame of object like or before begin main loop). -
update
protected void update()Like unity Update (invoke after render on each frames). -
onDestroy
protected void onDestroy()Like unity OnDestroy (invoke after destroy object or on end of game). -
render
Method who render a object on screen (invoke on begin of each frames).
-