![]() |
Eye of the Nile Docs
Everything you need to know to get started!
|
Script for both the rocks that Geb throws and the debris that fall when Geb's walls break. This script detects when the rock collides with any object on collisionLayers (defined on this script in the Inspector). Optionally, this script can have a chance to spawn a rock golem upon impact. If a rock golem is not spawned, the rock will break instead.
Documentation updated 1/11/2025
Public Attributes | |
LayerMask | collisionLayers |
The layers that the rock will detect when collided with. | |
float | spawnProbability = 0.5f |
The probability for a rock golem to spawn on collision. | |
Protected Attributes | |
GebRoomController | gebRoomController |
Reference to Geb's room controller. | |
GameObject | rockGolem |
Reference to the rock golem prefab that the rocks spawn. | |
Private Member Functions | |
void | Awake () |
void | OnTriggerEnter2D (Collider2D col) |
Private Attributes | |
System.Random | rng = new System.Random() |
Create random number generator. | |
|
private |
|
private |
LayerMask GebRock.collisionLayers |
The layers that the rock will detect when collided with.
|
protected |
Reference to Geb's room controller.
|
private |
Create random number generator.
|
protected |
Reference to the rock golem prefab that the rocks spawn.
float GebRock.spawnProbability = 0.5f |
The probability for a rock golem to spawn on collision.