Platformer Pro  2.3.2
A platform game kit for Unity.
PlatformerPro.PushablePullable Class Reference

An object that can be pushed and pulled. More...

Inheritance diagram for PlatformerPro.PushablePullable:
PlatformerPro.Pushable PlatformerPro.IPullable

Public Member Functions

virtual void Pull (IMob character, Vector2 amount)
 Pull the pullable. More...
 
- Public Member Functions inherited from PlatformerPro.Pushable
virtual void Push (IMob character, Vector2 amount, bool pushAsForce)
 Push this pushable. More...
 

Additional Inherited Members

- Protected Attributes inherited from PlatformerPro.Pushable
bool resetVelocityOnPush = true
 Should we reset the velocity to zero before pushing. More...
 
float additionalDynamicFriction = 0.0f
 Should we apply additional friciton when moving? Helps to stop boxes sliding over the character etc when pushing as translate. More...
 
float originalY
 When using move position we use this variable to help us simulate gravity. More...
 
bool targetSet = false
 Do we have a target position More...
 
Vector2 targetPosition
 The target position for a MovePosition move. More...
 
bool forceSet = false
 Do we have a force to add. More...
 
Vector2 force
 The force to apply when using force based pushing. More...
 
float mass
 Original mass, we store it here as we change it while pushing if push mode is MovePosition(). More...
 
bool physicsUpdatedThisFrame
 Has FixedUpdate been executed? More...
 
new Rigidbody2D rigidbody2D
 Reference to the rigidbody 2D. More...
 
bool canRotate
 Can we rotate? More...
 
float canRotateTimer
 Tracks how long after pushing before we can rotate again. More...
 
- Static Protected Attributes inherited from PlatformerPro.Pushable
const float canRotateTime = 0.066f
 How long after pushing before we can rotate again. More...
 
- Properties inherited from PlatformerPro.Pushable
virtual float Mass [get]
 Get the pushables weight. More...
 
- Properties inherited from PlatformerPro.IPullable
float Mass [get]
 Gets the objects mass. More...
 

Detailed Description

An object that can be pushed and pulled.

Member Function Documentation

◆ Pull()

virtual void PlatformerPro.PushablePullable.Pull ( IMob  character,
Vector2  amount 
)
virtual

Pull the pullable.

Parameters
characterCharacter doing the pulling.
amountAmount being pulled.

Implements PlatformerPro.IPullable.


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