Corgi Engine v10.1
Loading...
Searching...
No Matches
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.
virtual void AssignObjectToCheckPoint (Respawnable listener)

Public Attributes

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

Protected Member Functions

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

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: