Package com.csse3200.game.areas.terrain
Class ShipPartTileComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.areas.terrain.ShipPartTileComponent
- All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable
A tile that drops a ship part on destroy. Can contain a ship debris
which must be destroyed first if it exists.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addClueItem
(Entity shipClueItem) Set the ship clue item associated with this tile.void
addShipDebris
(Entity shipDebris) Set the ship debris associated with this tile.void
create()
Called when the entity is created and registered.void
read
(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonMap) void
write
(com.badlogic.gdx.utils.Json json) Methods inherited from class com.csse3200.game.components.Component
dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
ShipPartTileComponent
public ShipPartTileComponent()
-
-
Method Details
-
create
public void create()Description copied from class:Component
Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished. -
addShipDebris
Set the ship debris associated with this tile.- Parameters:
shipDebris
- entity to be added
-
addClueItem
Set the ship clue item associated with this tile.- Parameters:
shipClueItem
- entity to be added
-
write
public void write(com.badlogic.gdx.utils.Json json) -
read
public void read(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonMap)
-