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 TypeMethodDescriptionvoid
create()
Creates the event listener for the light to enable it to be toggled on and offvoid
read
(com.badlogic.gdx.utils.Json json, com.badlogic.gdx.utils.JsonValue jsonMap) void
Toggles the light between an on and off state, if the feature is unlocked.void
write
(com.badlogic.gdx.utils.Json json) Methods inherited from class com.csse3200.game.components.AuraLightComponent
dispose, getActive, setColor, setDistance, update
Methods 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:AuraLightComponent
Creates the event listener for the light to enable it to be toggled on and off- Overrides:
create
in classAuraLightComponent
-
toggleLight
public void toggleLight()Toggles the light between an on and off state, if the feature is unlocked.- Overrides:
toggleLight
in 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)
-