Corgi Engine  v8.8
MoreMountains.CorgiEngine.Hittable Class Reference

A class you can put on objects to trigger events when they get hit (whether that hit applied damage or not). Useful for switches and the likes. More...

Inheritance diagram for MoreMountains.CorgiEngine.Hittable:
MoreMountains.CorgiEngine.CorgiMonoBehaviour

Public Attributes

UnityEvent ActionOnHit
 an event that will get triggered when taking damage More...
 
UnityEvent ActionOnHitZero
 an event that will get triggered when taking a hit but no damage More...
 

Protected Member Functions

virtual void Start ()
 On Start we grab our Health component More...
 
virtual void OnHit ()
 When we get hit with actual damage, we trigger the ActionOnHit UnityEvent More...
 
virtual void OnHitZero ()
 When we get hit with zero damage, we trigger the ActionOnHitZero UnityEvent More...
 
virtual void OnEnable ()
 On enable, we grab our health and register to our hit delegates More...
 
virtual void OnDisable ()
 On disable, we unbind our hit delegates More...
 

Protected Attributes

Health _health
 

Detailed Description

A class you can put on objects to trigger events when they get hit (whether that hit applied damage or not). Useful for switches and the likes.

Member Function Documentation

◆ OnDisable()

virtual void MoreMountains.CorgiEngine.Hittable.OnDisable ( )
protectedvirtual

On disable, we unbind our hit delegates

◆ OnEnable()

virtual void MoreMountains.CorgiEngine.Hittable.OnEnable ( )
protectedvirtual

On enable, we grab our health and register to our hit delegates

◆ OnHit()

virtual void MoreMountains.CorgiEngine.Hittable.OnHit ( )
protectedvirtual

When we get hit with actual damage, we trigger the ActionOnHit UnityEvent

◆ OnHitZero()

virtual void MoreMountains.CorgiEngine.Hittable.OnHitZero ( )
protectedvirtual

When we get hit with zero damage, we trigger the ActionOnHitZero UnityEvent

◆ Start()

virtual void MoreMountains.CorgiEngine.Hittable.Start ( )
protectedvirtual

On Start we grab our Health component

Member Data Documentation

◆ _health

Health MoreMountains.CorgiEngine.Hittable._health
protected

◆ ActionOnHit

UnityEvent MoreMountains.CorgiEngine.Hittable.ActionOnHit

an event that will get triggered when taking damage

◆ ActionOnHitZero

UnityEvent MoreMountains.CorgiEngine.Hittable.ActionOnHitZero

an event that will get triggered when taking a hit but no damage


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