Class ShipLightComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.AuraLightComponent
com.csse3200.game.components.ship.ShipLightComponent
- All Implemented Interfaces:
com.badlogic.gdx.utils.Json.Serializable
Adds a controllable light source to the player ship.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate()Creates the event listener for the light to enable it to be toggled on and offvoidread(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonMap) voidToggles the light between an on and off state, if the feature is unlocked.voidwrite(com.badlogic.gdx.utils.Json json) Methods inherited from class com.csse3200.game.components.AuraLightComponent
dispose, getActive, setColor, setDistance, updateMethods inherited from class com.csse3200.game.components.Component
earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate
-
Constructor Details
-
ShipLightComponent
public ShipLightComponent()
-
-
Method Details
-
create
public void create()Description copied from class:AuraLightComponentCreates the event listener for the light to enable it to be toggled on and off- Overrides:
createin classAuraLightComponent
-
toggleLight
public void toggleLight()Toggles the light between an on and off state, if the feature is unlocked.- Overrides:
toggleLightin classAuraLightComponent
-
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)
-