An object that can be pushed.
More...
|
virtual void | Push (IMob character, Vector2 amount, bool pushAsForce) |
| Push this pushable. More...
|
|
|
virtual float | Mass [get] |
| Get the pushables weight. More...
|
|
An object that can be pushed.
◆ Push()
virtual void PlatformerPro.Pushable.Push |
( |
IMob |
character, |
|
|
Vector2 |
amount, |
|
|
bool |
pushAsForce |
|
) |
| |
|
virtual |
Push this pushable.
- Parameters
-
character | Character who is pushing.. |
amount | Amount to push. |
◆ additionalDynamicFriction
float PlatformerPro.Pushable.additionalDynamicFriction = 0.0f |
|
protected |
Should we apply additional friciton when moving? Helps to stop boxes sliding over the character etc when pushing as translate.
◆ canRotate
bool PlatformerPro.Pushable.canRotate |
|
protected |
◆ canRotateTime
const float PlatformerPro.Pushable.canRotateTime = 0.066f |
|
staticprotected |
How long after pushing before we can rotate again.
◆ canRotateTimer
float PlatformerPro.Pushable.canRotateTimer |
|
protected |
Tracks how long after pushing before we can rotate again.
◆ force
Vector2 PlatformerPro.Pushable.force |
|
protected |
The force to apply when using force based pushing.
◆ forceSet
bool PlatformerPro.Pushable.forceSet = false |
|
protected |
Do we have a force to add.
◆ mass
float PlatformerPro.Pushable.mass |
|
protected |
Original mass, we store it here as we change it while pushing if push mode is MovePosition().
◆ originalY
float PlatformerPro.Pushable.originalY |
|
protected |
When using move position we use this variable to help us simulate gravity.
◆ physicsUpdatedThisFrame
bool PlatformerPro.Pushable.physicsUpdatedThisFrame |
|
protected |
Has FixedUpdate been executed?
◆ resetVelocityOnPush
bool PlatformerPro.Pushable.resetVelocityOnPush = true |
|
protected |
Should we reset the velocity to zero before pushing.
◆ rigidbody2D
new Rigidbody2D PlatformerPro.Pushable.rigidbody2D |
|
protected |
Reference to the rigidbody 2D.
◆ targetPosition
Vector2 PlatformerPro.Pushable.targetPosition |
|
protected |
The target position for a MovePosition move.
◆ targetSet
bool PlatformerPro.Pushable.targetSet = false |
|
protected |
Do we have a target position
◆ Mass
virtual float PlatformerPro.Pushable.Mass |
|
get |
Get the pushables weight.
The weight.
The documentation for this class was generated from the following file:
- D:/Projects/platformer-pro-2019.3/Assets/PlatformerPro/Scripts/Platforms/Pushable.cs