C# Class UnityPlatformer.Rope

Rope tile
Inheritance: UnityEngine.MonoBehaviour, IUpdateEntity
Afficher le fichier Open project: llafuente/unity-platformer

Méthodes publiques

Свойство Type Description
angleLimits float
easing EasingType
onBreakRope RopeCallback
onSideReached RopeCallback
passengers UnityEngine.LayerMask
ropeMass float
sectionPrefab UnityEngine.GameObject
segmentLength float
segments int
stop bool
usedFixedPosition bool

Méthodes publiques

Méthode Description
BreakRope ( ) : void

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

GetSectionAbove ( GameObject section ) : GameObject

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

GetSectionBelow ( GameObject section ) : GameObject

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

LatePlatformerUpdate ( float delta ) : void

Do nothing, use PlatformerUpdate instead

OnDisable ( ) : void

notify UpdateManager

OnEnable ( ) : void

notify UpdateManager

OnValidate ( ) : void

Update the rope on each editor change...

PlatformerUpdate ( float delta ) : void

Rope motion!

SpeedToSectionOffset ( float speed ) : float

Conversion factor

Start ( ) : void
UpdateRotation ( ) : void

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

Private Methods

Méthode Description
CreateAnchor ( ) : GameObject

Create Rope anchor

CreateSection ( int i, Rigidbody2D connectedBody ) : GameObject

Create and configure RopeSection

OnDrawGizmos ( ) : void

Method Details

BreakRope() public méthode

Break the rope and stop movement TODO break do not destroy sections
public BreakRope ( ) : void
Résultat void

GetSectionAbove() public méthode

Gets the rope section above the provided one or null if none.
public GetSectionAbove ( GameObject section ) : GameObject
section UnityEngine.GameObject
Résultat UnityEngine.GameObject

GetSectionBelow() public méthode

Gets the rope section below the provided one or null if none.
public GetSectionBelow ( GameObject section ) : GameObject
section UnityEngine.GameObject
Résultat UnityEngine.GameObject

LatePlatformerUpdate() public méthode

Do nothing, use PlatformerUpdate instead
public LatePlatformerUpdate ( float delta ) : void
delta float
Résultat void

OnDisable() public méthode

notify UpdateManager
public OnDisable ( ) : void
Résultat void

OnEnable() public méthode

notify UpdateManager
public OnEnable ( ) : void
Résultat void

OnValidate() public méthode

Update the rope on each editor change...
public OnValidate ( ) : void
Résultat void

PlatformerUpdate() public méthode

Rope motion!
public PlatformerUpdate ( float delta ) : void
delta float
Résultat void

SpeedToSectionOffset() public méthode

Conversion factor
public SpeedToSectionOffset ( float speed ) : float
speed float
Résultat float

Start() public méthode

public Start ( ) : void
Résultat void

UpdateRotation() public méthode

Update rope rotation, this is called PlatformerUpdate if you need to called it outside, remember that time must be updated before
public UpdateRotation ( ) : void
Résultat void

Property Details

angleLimits public_oe property

Min rope angle.
public float angleLimits
Résultat float

easing public_oe property

rope rotation easing
public EasingType easing
Résultat EasingType

onBreakRope public_oe property

When rope is broken
public RopeCallback onBreakRope
Résultat RopeCallback

onSideReached public_oe property

When a side is reached (before change waving)
public RopeCallback onSideReached
Résultat RopeCallback

passengers public_oe property

Object that can be 'atachhed' to the rope This allow to create rope in background, for example.
public LayerMask,UnityEngine passengers
Résultat UnityEngine.LayerMask

ropeMass public_oe property

The mass of each rope segment (except the last which has mass = ropeMass * 5).
public float ropeMass
Résultat float

sectionPrefab public_oe property

The prefab to use for each rope section (i.e. put the mesh or sprite here)..
public GameObject,UnityEngine sectionPrefab
Résultat UnityEngine.GameObject

segmentLength public_oe property

The length of the rope..
public float segmentLength
Résultat float

segments public_oe property

The number of segments..
public int segments
Résultat int

stop public_oe property

rope is stopped
public bool stop
Résultat bool

usedFixedPosition public_oe property

If true only the bottom section of the rope will be grabable and will have a fixed position..
public bool usedFixedPosition
Résultat bool