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

Checkpoint class. Will make the player respawn at this point if it dies. More...

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

Public Member Functions

virtual void SpawnPlayer (Character player)
 Spawns the player at the checkpoint. More...
 
virtual void AssignObjectToCheckPoint (Respawnable listener)
 

Public Attributes

Character.FacingDirections FacingDirection = Character.FacingDirections.Right
 the direction the character should face when spawning at this checkpoint More...
 
bool ForceAssignation = false
 whether or not this checkpoint should override any order and assign itself on entry More...
 
int CheckPointOrder
 the order of the checkpoint More...
 
bool CanBeReachedMoreThanOnce = true
 whether or not this checkpoint can be reached more than once More...
 
UnityEvent OnCheckpointReached
 an event to trigger when this checkpoint is reached More...
 

Protected Member Functions

virtual void Awake ()
 Initializes the list of listeners More...
 
virtual void OnTriggerEnter2D (Collider2D collider)
 Describes what happens when something enters the checkpoint More...
 
virtual void OnDrawGizmos ()
 On DrawGizmos, we draw lines to show the path the object will follow More...
 

Protected Attributes

bool _reached = false
 
List< Respawnable_listeners
 

Detailed Description

Checkpoint class. Will make the player respawn at this point if it dies.

Member Function Documentation

◆ AssignObjectToCheckPoint()

virtual void MoreMountains.CorgiEngine.CheckPoint.AssignObjectToCheckPoint ( Respawnable  listener)
virtual

◆ Awake()

virtual void MoreMountains.CorgiEngine.CheckPoint.Awake ( )
protectedvirtual

Initializes the list of listeners

◆ OnDrawGizmos()

virtual void MoreMountains.CorgiEngine.CheckPoint.OnDrawGizmos ( )
protectedvirtual

On DrawGizmos, we draw lines to show the path the object will follow

◆ OnTriggerEnter2D()

virtual void MoreMountains.CorgiEngine.CheckPoint.OnTriggerEnter2D ( Collider2D  collider)
protectedvirtual

Describes what happens when something enters the checkpoint

Parameters
colliderThe Collider2D colliding with the checkpoint.

◆ SpawnPlayer()

virtual void MoreMountains.CorgiEngine.CheckPoint.SpawnPlayer ( Character  player)
virtual

Spawns the player at the checkpoint.

Parameters
playerPlayer.

Member Data Documentation

◆ _listeners

List<Respawnable> MoreMountains.CorgiEngine.CheckPoint._listeners
protected

◆ _reached

bool MoreMountains.CorgiEngine.CheckPoint._reached = false
protected

◆ CanBeReachedMoreThanOnce

bool MoreMountains.CorgiEngine.CheckPoint.CanBeReachedMoreThanOnce = true

whether or not this checkpoint can be reached more than once

◆ CheckPointOrder

int MoreMountains.CorgiEngine.CheckPoint.CheckPointOrder

the order of the checkpoint

◆ FacingDirection

Character.FacingDirections MoreMountains.CorgiEngine.CheckPoint.FacingDirection = Character.FacingDirections.Right

the direction the character should face when spawning at this checkpoint

◆ ForceAssignation

bool MoreMountains.CorgiEngine.CheckPoint.ForceAssignation = false

whether or not this checkpoint should override any order and assign itself on entry

◆ OnCheckpointReached

UnityEvent MoreMountains.CorgiEngine.CheckPoint.OnCheckpointReached

an event to trigger when this checkpoint is reached


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