Package com.mygdx.game.Entitys
Class Building
java.lang.Object
com.mygdx.game.Entitys.Entity
com.mygdx.game.Entitys.Building
- All Implemented Interfaces:
CollisionCallBack
public class Building extends Entity implements CollisionCallBack
Buildings that you see in game.
-
Method Summary
Modifier and Type Method Description voidBeginContact(CollisionInfo info)Called once a collision has being noticesvoidcreate(com.badlogic.gdx.math.Vector2 pos, java.lang.String name)Creates a building with the given name at the specified location.voidEndContact(CollisionInfo info)Called after the collision has being solvedvoidEnterTrigger(CollisionInfo info)Destroys the building and marks cannonball for removal.voidExitTrigger(CollisionInfo info)Called upon exiting a triggerbooleanisAlive()Methods inherited from class com.mygdx.game.Entitys.Entity
addComponent, addComponents, cleanUp, getComponent, getComponent, getComponents, getName, raiseEvents, setName, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
create
public void create(com.badlogic.gdx.math.Vector2 pos, java.lang.String name)Creates a building with the given name at the specified location.- Parameters:
pos- 2D position vectorname- name of building
-
isAlive
public boolean isAlive() -
BeginContact
Description copied from interface:CollisionCallBackCalled once a collision has being notices- Specified by:
BeginContactin interfaceCollisionCallBack
-
EndContact
Description copied from interface:CollisionCallBackCalled after the collision has being solved- Specified by:
EndContactin interfaceCollisionCallBack
-
EnterTrigger
Destroys the building and marks cannonball for removal.- Specified by:
EnterTriggerin interfaceCollisionCallBack- Parameters:
info- CollisionInfo container
-
ExitTrigger
Description copied from interface:CollisionCallBackCalled upon exiting a trigger- Specified by:
ExitTriggerin interfaceCollisionCallBack
-