platformer
Public Member Functions | Public Attributes | Properties | List of all members
UnityPlatformer.Rope Class Reference

Rope tile More...

Inheritance diagram for UnityPlatformer.Rope:
UnityPlatformer.IUpdateEntity

Public Member Functions

delegate void RopeCallback (Rope rope)
 Rope callback type More...
 
float SpeedToSectionOffset (float speed)
 Conversion factor More...
 
virtual GameObject GetSectionAbove (GameObject section)
 Gets the rope section above the provided one or null if none. More...
 
virtual GameObject GetSectionBelow (GameObject section)
 Gets the rope section below the provided one or null if none. More...
 
virtual void OnEnable ()
 notify UpdateManager More...
 
virtual void OnDisable ()
 notify UpdateManager More...
 
void UpdateRotation ()
 Update rope rotation, this is called PlatformerUpdate if you need to called it outside, remember that time must be updated before More...
 
virtual void PlatformerUpdate (float delta)
 Rope motion! More...
 
virtual void LatePlatformerUpdate (float delta)
 Do nothing, use PlatformerUpdate instead More...
 
void BreakRope ()
 Break the rope and stop movement TODO break do not destroy sections More...
 

Public Attributes

LayerMask passengers
 Object that can be 'atachhed' to the rope This allow to create rope in background, for example. More...
 
int segments
 The number of segments.. More...
 
float segmentLength
 The length of the rope.. More...
 
GameObject sectionPrefab
 The prefab to use for each rope section (i.e. put the mesh or sprite here).. More...
 
bool usedFixedPosition
 If true only the bottom section of the rope will be grabable and will have a fixed position.. More...
 
float ropeMass = 1.0f
 The mass of each rope segment (except the last which has mass = ropeMass * 5). More...
 
float angleLimits = 0
 Min rope angle. More...
 
EasingType easing = EasingType.Sine
 rope rotation easing More...
 
bool stop = false
 rope is stopped More...
 
float initialTime = 0
 Initial time More...
 
float rotationTime = 3.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...
 
RopeCallback onSideReached
 When a side is reached (before change waving) More...
 
RopeCallback onBreak
 When rope is broken More...
 

Properties

float faceDir [get]
 Where the rope movement is facing More...
 

Detailed Description

Rope tile

Member Function Documentation

◆ BreakRope()

void UnityPlatformer.Rope.BreakRope ( )
inline

Break the rope and stop movement TODO break do not destroy sections

◆ GetSectionAbove()

virtual GameObject UnityPlatformer.Rope.GetSectionAbove ( GameObject  section)
inlinevirtual

Gets the rope section above the provided one or null if none.

Returns
The section below.

◆ GetSectionBelow()

virtual GameObject UnityPlatformer.Rope.GetSectionBelow ( GameObject  section)
inlinevirtual

Gets the rope section below the provided one or null if none.

Returns
The section below.

◆ LatePlatformerUpdate()

virtual void UnityPlatformer.Rope.LatePlatformerUpdate ( float  delta)
inlinevirtual

Do nothing, use PlatformerUpdate instead

Implements UnityPlatformer.IUpdateEntity.

◆ OnDisable()

virtual void UnityPlatformer.Rope.OnDisable ( )
inlinevirtual

notify UpdateManager

◆ OnEnable()

virtual void UnityPlatformer.Rope.OnEnable ( )
inlinevirtual

notify UpdateManager

◆ PlatformerUpdate()

virtual void UnityPlatformer.Rope.PlatformerUpdate ( float  delta)
inlinevirtual

Rope motion!

Implements UnityPlatformer.IUpdateEntity.

◆ RopeCallback()

delegate void UnityPlatformer.Rope.RopeCallback ( Rope  rope)

Rope callback type

◆ SpeedToSectionOffset()

float UnityPlatformer.Rope.SpeedToSectionOffset ( float  speed)
inline

Conversion factor

◆ UpdateRotation()

void UnityPlatformer.Rope.UpdateRotation ( )
inline

Update rope rotation, this is called PlatformerUpdate if you need to called it outside, remember that time must be updated before

Member Data Documentation

◆ angleLimits

float UnityPlatformer.Rope.angleLimits = 0

Min rope angle.

◆ easing

EasingType UnityPlatformer.Rope.easing = EasingType.Sine

rope rotation easing

◆ initialTime

float UnityPlatformer.Rope.initialTime = 0

Initial time

◆ onBreak

RopeCallback UnityPlatformer.Rope.onBreak

When rope is broken

◆ onSideReached

RopeCallback UnityPlatformer.Rope.onSideReached

When a side is reached (before change waving)

◆ passengers

LayerMask UnityPlatformer.Rope.passengers

Object that can be 'atachhed' to the rope This allow to create rope in background, for example.

◆ ropeMass

float UnityPlatformer.Rope.ropeMass = 1.0f

The mass of each rope segment (except the last which has mass = ropeMass * 5).

◆ rotationTime

float UnityPlatformer.Rope.rotationTime = 3.0f

Rotation speed in degrees per second.

◆ sectionPrefab

GameObject UnityPlatformer.Rope.sectionPrefab

The prefab to use for each rope section (i.e. put the mesh or sprite here)..

◆ segmentLength

float UnityPlatformer.Rope.segmentLength

The length of the rope..

◆ segments

int UnityPlatformer.Rope.segments

The number of segments..

◆ slowDownModifier

float UnityPlatformer.Rope.slowDownModifier

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

◆ stop

bool UnityPlatformer.Rope.stop = false

rope is stopped

◆ usedFixedPosition

bool UnityPlatformer.Rope.usedFixedPosition

If true only the bottom section of the rope will be grabable and will have a fixed position..

Property Documentation

◆ faceDir

float UnityPlatformer.Rope.faceDir
get

Where the rope movement is facing


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