Eye of the Nile Docs
Everything you need to know to get started!
Loading...
Searching...
No Matches
GebPhaseController Class Reference

Detailed Description

This script handles Geb's phases. It keeps track of the current phase or when a cutscene is playing, and detects when a new phase should be started. When a new phase is started, it tells the Geb's other scripts.

Documentation updated 4/2/2025

Author
Alexander Art

Public Member Functions

void StartGebOpeningCutscene ()
 Start Geb's opening cutscene and tell all of the other Geb scripts that the opening cutscene has started.
 
void StartGebBossfight ()
 Start phase 1 (do this after the cutscene) and tell all of the other Geb scripts that phase 1 has started.
 
void StartGebPhase2 ()
 Start phase 2 and tell all of the other Geb scripts that phase 2 has started.
 
void StartGebPhase3 ()
 Start phase 3 and tell all of the other Geb scripts that phase 3 has started.
 
void TriggerGebDefeated ()
 Set the phase to closing cutscene and tell all of the other Geb scripts that the cutscene is playing.
 
void ClosingCutsceneEnded ()
 Set the phase to defeated and tell all of the other Geb scripts that the closing cutscene is over.
 

Public Attributes

float phase2Threshold = 2f/3f
 The percentage that Geb's health needs to drop below for phase 2 to start.
 
float phase3Threshold = 1f/3f
 The percentage that Geb's health needs to drop below for phase 3 to start.
 

Protected Attributes

BossHealth bossHealth
 Reference to Geb's health script, used for changing the phase when Geb reaches certain health thresholds.
 
GebBossController bossController
 References to all of the other Geb-specific scripts.
 
GebRoomController roomController
 

Properties

GebPhase phase = GebPhase.Inactive [get, private set]
 Keep track of the current phase.
 
float phaseTime = 0.0f [get, private set]
 Used for keeping track of how long a phase has been active. Useful for controlling cutscenes.
 

Events

static Action onGebDefeated
 Triggers when Geb is defeated.
 

Private Member Functions

void Awake ()
 Set references to Geb's health script and the Geb-specific scripts.
 
void Update ()
 

Private Attributes

int previousHealth
 Used for checking when the health of the boss changes.
 

Member Function Documentation

◆ Awake()

void GebPhaseController.Awake ( )
private

Set references to Geb's health script and the Geb-specific scripts.

◆ ClosingCutsceneEnded()

void GebPhaseController.ClosingCutsceneEnded ( )

Set the phase to defeated and tell all of the other Geb scripts that the closing cutscene is over.

◆ StartGebBossfight()

void GebPhaseController.StartGebBossfight ( )

Start phase 1 (do this after the cutscene) and tell all of the other Geb scripts that phase 1 has started.

◆ StartGebOpeningCutscene()

void GebPhaseController.StartGebOpeningCutscene ( )

Start Geb's opening cutscene and tell all of the other Geb scripts that the opening cutscene has started.

◆ StartGebPhase2()

void GebPhaseController.StartGebPhase2 ( )

Start phase 2 and tell all of the other Geb scripts that phase 2 has started.

◆ StartGebPhase3()

void GebPhaseController.StartGebPhase3 ( )

Start phase 3 and tell all of the other Geb scripts that phase 3 has started.

◆ TriggerGebDefeated()

void GebPhaseController.TriggerGebDefeated ( )

Set the phase to closing cutscene and tell all of the other Geb scripts that the cutscene is playing.

◆ Update()

void GebPhaseController.Update ( )
private

Member Data Documentation

◆ bossController

GebBossController GebPhaseController.bossController
protected

References to all of the other Geb-specific scripts.

◆ bossHealth

BossHealth GebPhaseController.bossHealth
protected

Reference to Geb's health script, used for changing the phase when Geb reaches certain health thresholds.

◆ phase2Threshold

float GebPhaseController.phase2Threshold = 2f/3f

The percentage that Geb's health needs to drop below for phase 2 to start.

◆ phase3Threshold

float GebPhaseController.phase3Threshold = 1f/3f

The percentage that Geb's health needs to drop below for phase 3 to start.

◆ previousHealth

int GebPhaseController.previousHealth
private

Used for checking when the health of the boss changes.

◆ roomController

GebRoomController GebPhaseController.roomController
protected

Property Documentation

◆ phase

GebPhase GebPhaseController.phase = GebPhase.Inactive
getprivate set

Keep track of the current phase.

◆ phaseTime

float GebPhaseController.phaseTime = 0.0f
getprivate set

Used for keeping track of how long a phase has been active. Useful for controlling cutscenes.

Event Documentation

◆ onGebDefeated

Action GebPhaseController.onGebDefeated
static

Triggers when Geb is defeated.


The documentation for this class was generated from the following file: