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

Top of a rope. More...

Inheritance diagram for PlatformerPro.RopeAnchor:
PlatformerPro.RopeSection

Public Member Functions

override Vector2 GetCharacterPositionForPosition (float position)
 Gets the position in world space the character should be based on how far up the rope section they are. More...
 
override Vector2 GetCharacterPositionForPosition (float position, float handOffset)
 Gets the position in world space the character should be based on how far up the rope section they are. More...
 
override float GetCharacterRotationForPosition (float position, float handOffset)
 Gets the rotation (in eueler z degrees) for the given rope position. More...
 
override float GetPositionForCharacterPosition (Vector2 position)
 Gets how far up the rope section (0 at bottom, 1 at top) a character is. More...
 

Protected Member Functions

override void Init ()
 Init this instance. More...
 

Properties

override float Length [get]
 Get the rope section length. More...
 
- Properties inherited from PlatformerPro.RopeSection
virtual Rope Rope [get]
 Gets the rope that owns this rope section. More...
 
virtual float Length [get]
 Get the rope section length. More...
 
virtual RopeSection SectionAbove [get]
 Gets the rope section above this one. More...
 
virtual RopeSection SectionBelow [get]
 Gets the rope section below this one. More...
 

Additional Inherited Members

- Public Attributes inherited from PlatformerPro.RopeSection
bool usedFixedPosition
 If true, the rope will not be climable but instead be a fixed point to which the character is attached. More...
 
- Protected Attributes inherited from PlatformerPro.RopeSection
Rope rope
 The parent rope. More...
 
BoxCollider2D myCollider
 The box collider for this rope section. More...
 

Detailed Description

Top of a rope.

Member Function Documentation

◆ GetCharacterPositionForPosition() [1/2]

override Vector2 PlatformerPro.RopeAnchor.GetCharacterPositionForPosition ( float  position)
virtual

Gets the position in world space the character should be based on how far up the rope section they are.

Returns
The center for position.
Parameters
characterPositionCharacters grab position.

Reimplemented from PlatformerPro.RopeSection.

◆ GetCharacterPositionForPosition() [2/2]

override Vector2 PlatformerPro.RopeAnchor.GetCharacterPositionForPosition ( float  position,
float  handOffset 
)
virtual

Gets the position in world space the character should be based on how far up the rope section they are.

Returns
The center for position.
Parameters
characterPositionCharacters grab position.
characterPositionOffset from characters center and their grab (usually hand) position.

Reimplemented from PlatformerPro.RopeSection.

◆ GetCharacterRotationForPosition()

override float PlatformerPro.RopeAnchor.GetCharacterRotationForPosition ( float  position,
float  handOffset 
)
virtual

Gets the rotation (in eueler z degrees) for the given rope position.

Returns
The center for position.
Parameters
characterPositionCharacters grab position.
characterPositionOffset from characters center and their grab (usually hand) position.

Reimplemented from PlatformerPro.RopeSection.

◆ GetPositionForCharacterPosition()

override float PlatformerPro.RopeAnchor.GetPositionForCharacterPosition ( Vector2  position)
virtual

Gets how far up the rope section (0 at bottom, 1 at top) a character is.

Returns
The center for position.
Parameters
characterPositionCharacters grab position.

Reimplemented from PlatformerPro.RopeSection.

◆ Init()

override void PlatformerPro.RopeAnchor.Init ( )
protectedvirtual

Init this instance.

Reimplemented from PlatformerPro.RopeSection.

Property Documentation

◆ Length

override float PlatformerPro.RopeAnchor.Length
get

Get the rope section length.

The length.


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