Class InanimateBox
java.lang.Object
rekit.logic.gameelements.GameElement
rekit.logic.gameelements.inanimate.Inanimate
rekit.logic.gameelements.inanimate.InanimateBox
- All Implemented Interfaces:
Collidable
- Direct Known Subclasses:
InanimateDoor
This is the default implementation of an inanimate in the game (no ground).
-
Nested Class Summary
Nested classes/interfaces inherited from interface rekit.logic.Collidable
Collidable.Optional
-
Field Summary
Fields inherited from class rekit.logic.gameelements.GameElement
deleteMe, deltaTime, team, visible
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
InanimateBox
(Vec pos, Vec size, RGBAColor color) Create an InanimateBox. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Template method that will be called periodically after being added to aIScene
.static Inanimate
staticCreate
(Vec pos) Create a new InanimateBox.Methods inherited from class rekit.logic.gameelements.inanimate.Inanimate
collidedWithSolid, create, getLives, getPrototype, reactToCollision
Methods inherited from class rekit.logic.gameelements.GameElement
checkCollision, destroy, getDeleteMe, getFrame, getPos, getScene, getSize, getTeam, getVel, getZ, getZHint, init, isAddableToGroup, isVisible, killBoost, logicLoop, render, setPos, setScene, setSize, setVel
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface rekit.logic.Collidable
addDamage
-
Constructor Details
-
InanimateBox
Create an InanimateBox.- Parameters:
pos
- the positionsize
- the sizecolor
- the color
-
-
Method Details
-
internalRender
Description copied from class:GameElement
Template 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
.- Overrides:
internalRender
in classInanimate
- Parameters:
f
- theGameGrid
that represents the games field and supplies primitive drawing operations.
-
staticCreate
Create a new InanimateBox.- Parameters:
pos
- the position- Returns:
- the new Inanimate
-