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

Detailed Description

Additional script for the rock golems in Geb's bossroom. What this script does:

  • Decrements the rock golem count in Geb's bossroom when the rock golems die (function activated by OnDeath() in ObjectHealth).
  • Prevents the rock golems from getting stuck in the outer walls of Geb's bossroom.
  • Removes the rock golems when Geb is defeated.

Documentation updated 1/28/2025

Author
Alexander Art

Public Member Functions

void Die ()
 Activated by onGebDefeated event when Geb is defeated.
 
void DecrementRockGolemCount ()
 Subtracts 1 from Geb's bossroom's rock golem count. Called by the rock golem's ObjectHealth when it dies.
 

Protected Attributes

ObjectHealth objectHealth
 Reference to the rock golem's health script.
 
GebPhaseController gebPhaseController
 Reference to Geb's phase controller.
 
GebRoomController gebRoomController
 Reference to Geb's room controller.
 
float maxOutOfBoundsRange = 25f
 There is an additional range outside of the bounds of Geb's bossroom where the rock golems can spawn but the player can't go.
 

Private Member Functions

void Awake ()
 
void OnEnable ()
 Subscribes to the GebPhaseController.onGebDefeated event.
 
void OnDisable ()
 Unsubscribes from the GebPhaseController.onGebDefeated event.
 
void Start ()
 
void Update ()
 Prevent the rock golems from getting stuck in the wall and get rid of the golems when Geb is defeated.
 

Private Attributes

float minPosX
 The minimum x position that the rock golems can have. Calculated using the golem's width and the bounds of the room.
 
float maxPosX
 The maximum x position that the rock golems can have. Calculated using the golem's width and the bounds of the room.
 

Member Function Documentation

◆ Awake()

void GebRockGolem.Awake ( )
private

◆ DecrementRockGolemCount()

void GebRockGolem.DecrementRockGolemCount ( )

Subtracts 1 from Geb's bossroom's rock golem count. Called by the rock golem's ObjectHealth when it dies.

◆ Die()

void GebRockGolem.Die ( )

Activated by onGebDefeated event when Geb is defeated.

◆ OnDisable()

void GebRockGolem.OnDisable ( )
private

Unsubscribes from the GebPhaseController.onGebDefeated event.

◆ OnEnable()

void GebRockGolem.OnEnable ( )
private

Subscribes to the GebPhaseController.onGebDefeated event.

◆ Start()

void GebRockGolem.Start ( )
private

◆ Update()

void GebRockGolem.Update ( )
private

Prevent the rock golems from getting stuck in the wall and get rid of the golems when Geb is defeated.

Member Data Documentation

◆ gebPhaseController

GebPhaseController GebRockGolem.gebPhaseController
protected

Reference to Geb's phase controller.

◆ gebRoomController

GebRoomController GebRockGolem.gebRoomController
protected

Reference to Geb's room controller.

◆ maxOutOfBoundsRange

float GebRockGolem.maxOutOfBoundsRange = 25f
protected

There is an additional range outside of the bounds of Geb's bossroom where the rock golems can spawn but the player can't go.

◆ maxPosX

float GebRockGolem.maxPosX
private

The maximum x position that the rock golems can have. Calculated using the golem's width and the bounds of the room.

◆ minPosX

float GebRockGolem.minPosX
private

The minimum x position that the rock golems can have. Calculated using the golem's width and the bounds of the room.

◆ objectHealth

ObjectHealth GebRockGolem.objectHealth
protected

Reference to the rock golem's health script.


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