Eye of the Nile Docs
Everything you need to know to get started!
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Pages
BoulderHitbox Class Reference

Detailed Description

Detects collisions for the boulder hazard (BoulderHazard). When colliding with something on the boulder's collision layers, it will damage it and break the boulder.

Documentation updated 8/26/2024

Author
Roy Pascual

Private Member Functions

void OnTriggerEnter2D (Collider2D collision)
 If an object on one of boulder's collision layers is in the boulder hitbox, damage it if possible, then destroy the boulder.
 
void Awake ()
 Set reference to the BoulderHazard component.
 

Private Attributes

BoulderHazard boulderHazard
 Reference to the BoulderHazard component on the boulder.
 

Member Function Documentation

◆ Awake()

void BoulderHitbox.Awake ( )
private

Set reference to the BoulderHazard component.

◆ OnTriggerEnter2D()

void BoulderHitbox.OnTriggerEnter2D ( Collider2D collision)
private

If an object on one of boulder's collision layers is in the boulder hitbox, damage it if possible, then destroy the boulder.

Parameters
collisionRepresents the object that collided with the boulder hitbox.

Member Data Documentation

◆ boulderHazard

BoulderHazard BoulderHitbox.boulderHazard
private

Reference to the BoulderHazard component on the boulder.


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