platformer
Public Member Functions | Public Attributes | List of all members
UnityPlatformer.HitBox Class Reference

HitBoxes are triggers that Deal/Revieve Damage or enter areas(tile)
DealDamage require Damage MonoBehaviour
EnterAreas require Collider2D to be BoxCollider2D More...

Inheritance diagram for UnityPlatformer.HitBox:

Public Member Functions

void Start ()
 check missconfigurations and initialize More...
 
bool IsDisabled ()
 Return if the HitBox is disabled base on enabledOnStates More...
 
LayerMask GetCollisionMask ()
 Get final collision mask, taking into consideration useGlobalMask flags More...
 
void OnTriggerEnter2D (Collider2D o)
 I'm a DealDamage, o is RecieveDamage, then Deal Damage to it's owner! More...
 

Public Attributes

CharacterPart part
 Character part this HitBox belong More...
 
bool useGlobalMask = true
 Flag More...
 
LayerMask collisionMask
 Who can deal damage to me? More...
 
CharacterHealth owner
 HitBox owner More...
 
HitBoxType type = HitBoxType.DealDamage
 HitBoxType More...
 
bool dealDamageToSelf = false
 Can i deal damage to myself? More...
 
CharacterStatesCheck characterState
 Combo to check character state More...
 

Detailed Description

HitBoxes are triggers that Deal/Revieve Damage or enter areas(tile)
DealDamage require Damage MonoBehaviour
EnterAreas require Collider2D to be BoxCollider2D

Member Function Documentation

◆ GetCollisionMask()

LayerMask UnityPlatformer.HitBox.GetCollisionMask ( )
inline

Get final collision mask, taking into consideration useGlobalMask flags

◆ IsDisabled()

bool UnityPlatformer.HitBox.IsDisabled ( )
inline

Return if the HitBox is disabled base on enabledOnStates

◆ OnTriggerEnter2D()

void UnityPlatformer.HitBox.OnTriggerEnter2D ( Collider2D  o)
inline

I'm a DealDamage, o is RecieveDamage, then Deal Damage to it's owner!

◆ Start()

void UnityPlatformer.HitBox.Start ( )
inline

check missconfigurations and initialize

Member Data Documentation

◆ characterState

CharacterStatesCheck UnityPlatformer.HitBox.characterState

Combo to check character state

◆ collisionMask

LayerMask UnityPlatformer.HitBox.collisionMask

Who can deal damage to me?

Only used when type=HitBoxType.RecieveDamage.

◆ dealDamageToSelf

bool UnityPlatformer.HitBox.dealDamageToSelf = false

Can i deal damage to myself?

◆ owner

CharacterHealth UnityPlatformer.HitBox.owner

HitBox owner

◆ part

CharacterPart UnityPlatformer.HitBox.part

Character part this HitBox belong

◆ type

HitBoxType UnityPlatformer.HitBox.type = HitBoxType.DealDamage

HitBoxType

◆ useGlobalMask

bool UnityPlatformer.HitBox.useGlobalMask = true

Flag


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