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

This zone lets you impact a Character equipped with an AutoMovement ability You'll be able to use it to change its direction, stop it in its tracks, or make it start/stop running More...

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

Public Types

enum  DirectionModes {
  DirectionModes.None, DirectionModes.Toggle, DirectionModes.ForceLeft, DirectionModes.ForceRight,
  DirectionModes.ForceStop
}
 the possible modes you can control direction with More...
 
enum  RunModes { RunModes.None, RunModes.Toggle, RunModes.ForceRun, RunModes.ForceWalk }
 the possible modes you can change the run state More...
 

Public Attributes

DirectionModes DirectionMode = DirectionModes.Toggle
 
RunModes RunMode = RunModes.None
 

Protected Member Functions

virtual void Awake ()
 On awake grabs the Collider2D and sets it correctly to is trigger More...
 
virtual void OnTriggerEnter2D (Collider2D collider)
 On trigger enter, we handle our collision More...
 
virtual void HandleCollision (Collider2D collider)
 Tests if we're colliding with a CharacterAutoMovement and interacts with it if needed More...
 

Protected Attributes

Collider2D _collider2D
 
CharacterAutoMovement _characterAutoMovement
 

Detailed Description

This zone lets you impact a Character equipped with an AutoMovement ability You'll be able to use it to change its direction, stop it in its tracks, or make it start/stop running

Member Enumeration Documentation

◆ DirectionModes

the possible modes you can control direction with

Enumerator
None 
Toggle 
ForceLeft 
ForceRight 
ForceStop 

◆ RunModes

the possible modes you can change the run state

Enumerator
None 
Toggle 
ForceRun 
ForceWalk 

Member Function Documentation

◆ Awake()

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

On awake grabs the Collider2D and sets it correctly to is trigger

◆ HandleCollision()

virtual void MoreMountains.CorgiEngine.AutoMovementControlZone.HandleCollision ( Collider2D  collider)
protectedvirtual

Tests if we're colliding with a CharacterAutoMovement and interacts with it if needed

Parameters
collider

◆ OnTriggerEnter2D()

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

On trigger enter, we handle our collision

Parameters
collider

Member Data Documentation

◆ _characterAutoMovement

CharacterAutoMovement MoreMountains.CorgiEngine.AutoMovementControlZone._characterAutoMovement
protected

◆ _collider2D

Collider2D MoreMountains.CorgiEngine.AutoMovementControlZone._collider2D
protected

◆ DirectionMode

DirectionModes MoreMountains.CorgiEngine.AutoMovementControlZone.DirectionMode = DirectionModes.Toggle

the selected direction mode none : will be ignored toggle : makes the character change direction (from right to left or from left to right) force left : makes the character go left force right : makes the character go right force stop : stops the character

◆ RunMode

RunModes MoreMountains.CorgiEngine.AutoMovementControlZone.RunMode = RunModes.None

the selected run mode none : does nothing toggle : runs if walking, walks if running force run : makes the character run force walk : makes the character walk


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