Corgi Engine
v9.0
|
This class handles what happens when the player reaches the level bounds. For each bound (above, below, left, right), you can define if the player will be killed, or if its movement will be constrained, or if nothing happens More...
Public Types | |
enum | BoundsBehavior { BoundsBehavior.Nothing, BoundsBehavior.Constrain, BoundsBehavior.Kill } |
the possible consequences of touching the level bounds More... | |
Public Member Functions | |
virtual void | Start () |
Initialization More... | |
virtual void | LateUpdate () |
Every frame, we check if the player is colliding with a level bound More... | |
Public Attributes | |
BoundsBehavior | Top = BoundsBehavior.Constrain |
what to do to the player when it reaches the top level bound More... | |
BoundsBehavior | Bottom = BoundsBehavior.Kill |
what to do to the player when it reaches the bottom level bound More... | |
BoundsBehavior | Left = BoundsBehavior.Constrain |
what to do to the player when it reaches the left level bound More... | |
BoundsBehavior | Right = BoundsBehavior.Constrain |
what to do to the player when it reaches the right level bound More... | |
bool | ResetForcesOnConstrain = true |
if this is true, controller forces will also be reset (on the appropriate axis) when constraining More... | |
Protected Member Functions | |
virtual void | ApplyBoundsBehavior (BoundsBehavior behavior, Vector2 constrainedPosition) |
Applies the specified bound behavior to the player More... | |
Protected Attributes | |
Bounds | _bounds |
CorgiController | _controller |
Character | _character |
Vector2 | _constrainedPosition |
OneWayLevelManager | _oneWayLevelManager |
This class handles what happens when the player reaches the level bounds. For each bound (above, below, left, right), you can define if the player will be killed, or if its movement will be constrained, or if nothing happens
|
protectedvirtual |
Applies the specified bound behavior to the player
behavior | Behavior. |
constrainedPosition | Constrained position. |
|
virtual |
Every frame, we check if the player is colliding with a level bound
|
virtual |
Initialization
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
BoundsBehavior MoreMountains.CorgiEngine.CharacterLevelBounds.Bottom = BoundsBehavior.Kill |
what to do to the player when it reaches the bottom level bound
BoundsBehavior MoreMountains.CorgiEngine.CharacterLevelBounds.Left = BoundsBehavior.Constrain |
what to do to the player when it reaches the left level bound
bool MoreMountains.CorgiEngine.CharacterLevelBounds.ResetForcesOnConstrain = true |
if this is true, controller forces will also be reset (on the appropriate axis) when constraining
BoundsBehavior MoreMountains.CorgiEngine.CharacterLevelBounds.Right = BoundsBehavior.Constrain |
what to do to the player when it reaches the right level bound
BoundsBehavior MoreMountains.CorgiEngine.CharacterLevelBounds.Top = BoundsBehavior.Constrain |
what to do to the player when it reaches the top level bound