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

Detailed Description

A projectile used in Geb's ability set that spawns an earthquake where it lands.

Documentation updated 11/13/2024

Author
Stephen Nuttall

Protected Member Functions

override void OnCollisionEnterMethods (Collision2D collisionInfo)
 Same execution as the base function, but also spawns particles and earthquake zone.
 
- Protected Member Functions inherited from BaseProjectile
virtual void AwakeMethods ()
 Runs when Awake() is called.
 
virtual void StartMethods ()
 Plays the spawn sound effect.
 
virtual void OnTriggerEnterMethods (Collider2D collision)
 Runs if the projectile collides with an object (and it's a trigger zone). Does nothing by default.
 
void UpdateFacing ()
 Flips the sprite and movement direction (if a compatable component for projectile movement is attached) depending on if the projectile is currently facing left or right.
 

Private Attributes

Transform boulderParticles
 Reference to the particles to spawn when the boulder breaks.
 
GameObject earthquakeZone
 

Additional Inherited Members

- Public Member Functions inherited from BaseProjectile
void FlipDirection ()
 
- Protected Attributes inherited from BaseProjectile
GameObject sprite
 Reference to the game object that holds the sprite renderer of the projectile. Often this is just the projectile itself, but sometimes there's a child with the sprite. This allows compatability with both systems.
 
int damage = 30
 The amount of damage the projectile will apply if it comes in contact with something it can damage.
 
bool damagePlayers = true
 If true, the projectile can damage the player.
 
bool damageNonPlayers = true
 If true, the projectile can damage objects that aren't the player (assuming they have an ObjectHealth component).
 
bool destroyOnImpact = true
 If true, the projectile will destroy itself when it hits something (regardless of if it can damage it or now).
 
EventReference spawnSFX
 Sound effect that plays when the projectile is spawned in.
 
bool flipSprite = true
 When facingLeft is true, the sprite will be flipped. Usually used to make the sprite "face the way the projectile is moving.".
 
- Properties inherited from BaseProjectile
int refDamage [get, private set]
 A mirror of damage that allows for other objects to read its value without changing it, and also allowing damage to appear in the Unity Editor.
 
bool facingLeft = false [get, private set]
 True if the projectile is facing (and thus moving) to the left. Likewise, false if the projectile is facing to the right.
 

Member Function Documentation

◆ OnCollisionEnterMethods()

override void EarthquakeProjectile.OnCollisionEnterMethods ( Collision2D collisionInfo)
protectedvirtual

Same execution as the base function, but also spawns particles and earthquake zone.

Reimplemented from BaseProjectile.

Member Data Documentation

◆ boulderParticles

Transform EarthquakeProjectile.boulderParticles
private

Reference to the particles to spawn when the boulder breaks.

◆ earthquakeZone

GameObject EarthquakeProjectile.earthquakeZone
private

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