Class ShipDebrisComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.ship.ShipDebrisComponent
- All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable
Handles Ship Debris events.
Currently, triggers a DEBRIS_CLEARED event on the mission manager when destroyed.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Resets spawning of ship eatersvoid
create()
Called when the entity is created and registered.void
setRandomInstance
(Random randomInstance) Sets the random instance to use.Methods inherited from class com.csse3200.game.components.Component
dispose, earlyUpdate, getEntity, read, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update, write
-
Constructor Details
-
ShipDebrisComponent
public ShipDebrisComponent()
-
-
Method Details
-
clearCanSpawnShipEater
public static void clearCanSpawnShipEater()Resets spawning of ship eaters -
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. -
setRandomInstance
Sets the random instance to use.- Parameters:
randomInstance
- to use
-