Corgi Engine
v9.0
|
A class needed on pushable objects if you want your character to be able to detect them More...
Public Member Functions | |
virtual void | Attach (CorgiController pusher) |
Attaches a pusher controller to this pushable object More... | |
virtual void | Detach (CorgiController pusher) |
Detaches the current pusher object from this pushable object More... | |
Public Attributes | |
float | PushSpeed = 3f |
the speed at which this object can be pushed More... | |
float | GroundedRaycastLength = 1f |
the length of the raycast we cast to detect if the object is grounded More... | |
float | GroundedRaycastOffset = 0.1f |
the vertical offset to apply when trying to detect the ground More... | |
LayerMask | GroundedLayerMask = LayerManager.ObstaclesLayerMask |
the layers this object considers as ground More... | |
bool | Grounded = false |
whether or not the object touches the ground this frame More... | |
CorgiController | Pusher |
the CorgiController currently pushing this object More... | |
Vector2 | Direction = Vector2.zero |
the direction this object is being pushed towards More... | |
Protected Member Functions | |
virtual void | Awake () |
On Awake we grab our components More... | |
virtual void | Update () |
On Update, we apply a force if needed More... | |
virtual void | CheckIfGrounded () |
Casts rays below the object to check if it's grounded this frame More... | |
Protected Attributes | |
CorgiController | _corgiController |
Collider2D | _collider2D |
Vector2 | _leftColliderBounds |
Vector2 | _rightColliderBounds |
A class needed on pushable objects if you want your character to be able to detect them
|
virtual |
Attaches a pusher controller to this pushable object
pusher |
|
protectedvirtual |
On Awake we grab our components
|
protectedvirtual |
Casts rays below the object to check if it's grounded this frame
|
virtual |
Detaches the current pusher object from this pushable object
pusher |
|
protectedvirtual |
On Update, we apply a force if needed
|
protected |
|
protected |
|
protected |
|
protected |
Vector2 MoreMountains.CorgiEngine.Pushable.Direction = Vector2.zero |
the direction this object is being pushed towards
bool MoreMountains.CorgiEngine.Pushable.Grounded = false |
whether or not the object touches the ground this frame
LayerMask MoreMountains.CorgiEngine.Pushable.GroundedLayerMask = LayerManager.ObstaclesLayerMask |
the layers this object considers as ground
float MoreMountains.CorgiEngine.Pushable.GroundedRaycastLength = 1f |
the length of the raycast we cast to detect if the object is grounded
float MoreMountains.CorgiEngine.Pushable.GroundedRaycastOffset = 0.1f |
the vertical offset to apply when trying to detect the ground
CorgiController MoreMountains.CorgiEngine.Pushable.Pusher |
the CorgiController currently pushing this object
float MoreMountains.CorgiEngine.Pushable.PushSpeed = 3f |
the speed at which this object can be pushed