Warp Obelisks are interactable objects throughout levels. The ObjectInteractable script triggers its public functions. The player can interact with a Warp Obelisk.prefab to go to Skyhub.unity or to set their spawnpoint.
Documentation updated 3/18/2025
- Author
- Stephen Nuttall, Alexander Art
|
bool | canSetSpawn = true |
| True if the warp obelisk can be activated, thus setting the player's spawnpoint. The only warp obelisk that has this set to false is the one in Skyhub.unity itself, which is used to return to the warp obelisk the player used to get to there.
|
|
|
bool | isActive = false |
| True if the warp obelisk is active, false otherwise.
|
|
|
void | Awake () |
|
void | OnEnable () |
| Subscribes to the onObeliskActivate event.
|
|
void | OnDisable () |
| Unsubscribes from the onObeliskActivate event.
|
|
◆ Awake()
void WarpObelisk.Awake |
( |
| ) |
|
|
private |
Sets references to unactivated, activated, respawnPoint, DataManager, and StageLoader. If the current spawnpoint in the DataManager is this warp obelisk's spawnpoint, set this warp obelisk to active. isActive is updated and the visual state of the warp obelisk is set.
◆ ConditionalWarpToSkyhub()
void WarpObelisk.ConditionalWarpToSkyhub |
( |
| ) |
|
Triggered by ObjectInteractable. This will only warp the player to the Skyhub if it's unlocked.
◆ OnDisable()
void WarpObelisk.OnDisable |
( |
| ) |
|
|
private |
Unsubscribes from the onObeliskActivate event.
◆ OnEnable()
void WarpObelisk.OnEnable |
( |
| ) |
|
|
private |
Subscribes to the onObeliskActivate event.
◆ SetSpawnpoint()
void WarpObelisk.SetSpawnpoint |
( |
| ) |
|
Triggered by ObjectInteractable. If enabled by canSetSpawn, set the DataManager's copy of spawnpoint to this spawnpoint, and activate the warp obelisk.
◆ UpdateActiveState()
void WarpObelisk.UpdateActiveState |
( |
| ) |
|
If the warp obelisk needs to change its visual state, then this will update it.
◆ WarpToSkyhub()
void WarpObelisk.WarpToSkyhub |
( |
| ) |
|
◆ activated
GameObject WarpObelisk.activated |
|
private |
Reference to the child object holding the sprite for the activated warp obelisk. An activated warp obelisk is the player's current respawn point.
◆ canSetSpawn
bool WarpObelisk.canSetSpawn = true |
True if the warp obelisk can be activated, thus setting the player's spawnpoint. The only warp obelisk that has this set to false is the one in Skyhub.unity itself, which is used to return to the warp obelisk the player used to get to there.
◆ dataManager
Reference to the DataManager. When the warp obelisk is activated, it tells the DataManager update the respawn point.
◆ isActive
bool WarpObelisk.isActive = false |
|
protected |
True if the warp obelisk is active, false otherwise.
◆ respawnPoint
Vector2 WarpObelisk.respawnPoint |
|
private |
The coordinates the player will respawn at if they die after activating this warp obelisk.
◆ stageLoader
◆ unactivated
GameObject WarpObelisk.unactivated |
|
private |
Reference to the child object holding the sprite for the unactivated warp obelisk. An unactivated warp obelisk is not the player's current respawn point.
◆ onObeliskActivate
Action WarpObelisk.onObeliskActivate |
|
static |
Triggers when any warp obelisk is activated.
The documentation for this class was generated from the following file: