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

Makes a rope swing automatically. Intended for ropes with 1 section and a fixed grab position for games that want ropes like 'Pitfall'. Note the ridigbody will be made kinematic and no other physics will affect it. More...

Inheritance diagram for PlatformerPro.RopeMotor:

Public Attributes

float speed = 33.0f
 Rotation speed in degrees per second. More...
 
float slowDownModifier
 If true we move at a constant speed, false we slow down at the apex. More...
 

Protected Member Functions

virtual void Init ()
 Init this instance. More...
 
virtual void UpdateAngle ()
 Do the work. More...
 

Protected Attributes

Rigidbody2D myRigidbody
 Cached rigidbody. More...
 
float max
 Cached max angle. More...
 
float min
 Cached min angle. More...
 

Detailed Description

Makes a rope swing automatically. Intended for ropes with 1 section and a fixed grab position for games that want ropes like 'Pitfall'. Note the ridigbody will be made kinematic and no other physics will affect it.

Member Function Documentation

◆ Init()

virtual void PlatformerPro.RopeMotor.Init ( )
protectedvirtual

Init this instance.

◆ UpdateAngle()

virtual void PlatformerPro.RopeMotor.UpdateAngle ( )
protectedvirtual

Do the work.

Member Data Documentation

◆ max

float PlatformerPro.RopeMotor.max
protected

Cached max angle.

◆ min

float PlatformerPro.RopeMotor.min
protected

Cached min angle.

◆ myRigidbody

Rigidbody2D PlatformerPro.RopeMotor.myRigidbody
protected

Cached rigidbody.

◆ slowDownModifier

float PlatformerPro.RopeMotor.slowDownModifier

If true we move at a constant speed, false we slow down at the apex.

◆ speed

float PlatformerPro.RopeMotor.speed = 33.0f

Rotation speed in degrees per second.


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