Package rekit.logic.gui
Class TimeDecorator
java.lang.Object
rekit.logic.gui.GuiElement
rekit.logic.gui.TimeDecorator
This class can decorate all
GuiElements so that they will
be deleted after a specific time.-
Field Summary
Fields inherited from class rekit.logic.gui.GuiElement
pos, scene, size, visible -
Constructor Summary
ConstructorsConstructorDescriptionTimeDecorator(IScene scene, GuiElement element, Timer timer) Create a TimeDecorator. -
Method Summary
Methods inherited from class rekit.logic.gui.GuiElement
getPos, getScene, getSize, isVisible, render, setPos, setVisible
-
Constructor Details
-
TimeDecorator
Create a TimeDecorator.- Parameters:
scene- the sceneelement- the decorated elementtimer- the timer
-
-
Method Details
-
logicLoop
public void logicLoop()Description copied from class:GuiElementTemplate method that will be called periodically after being added to a
IScene.Should be overwritten in sub classes for implementing custom logic, physics emulation, time-based actions, ...
- Overrides:
logicLoopin classGuiElement
-
internalRender
Description copied from class:GuiElementTemplate method that will be called periodically after being added to a
IScene. Must be as performant as possible to keep the FPS low, since it will be called in every render-loop.Should be overwritten in sub classes for custom visualization using the
GameGrid.- Specified by:
internalRenderin classGuiElement- Parameters:
f- theGameGridthat represents the games field and supplies primitive drawing operations.
-