C# Класс UnityPlatformer.Rope

Rope tile
Наследование: UnityEngine.MonoBehaviour, IUpdateEntity
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
angleLimits float
easing EasingType
onBreakRope RopeCallback
onSideReached RopeCallback
passengers UnityEngine.LayerMask
ropeMass float
sectionPrefab UnityEngine.GameObject
segmentLength float
segments int
stop bool
usedFixedPosition bool

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
CreateAnchor ( ) : GameObject

Create Rope anchor

CreateSection ( int i, Rigidbody2D connectedBody ) : GameObject

Create and configure RopeSection

OnDrawGizmos ( ) : void

Описание методов

BreakRope() публичный Метод

Break the rope and stop movement TODO break do not destroy sections
public BreakRope ( ) : void
Результат void

GetSectionAbove() публичный Метод

Gets the rope section above the provided one or null if none.
public GetSectionAbove ( GameObject section ) : GameObject
section UnityEngine.GameObject
Результат UnityEngine.GameObject

GetSectionBelow() публичный Метод

Gets the rope section below the provided one or null if none.
public GetSectionBelow ( GameObject section ) : GameObject
section UnityEngine.GameObject
Результат UnityEngine.GameObject

LatePlatformerUpdate() публичный Метод

Do nothing, use PlatformerUpdate instead
public LatePlatformerUpdate ( float delta ) : void
delta float
Результат void

OnDisable() публичный Метод

notify UpdateManager
public OnDisable ( ) : void
Результат void

OnEnable() публичный Метод

notify UpdateManager
public OnEnable ( ) : void
Результат void

OnValidate() публичный Метод

Update the rope on each editor change...
public OnValidate ( ) : void
Результат void

PlatformerUpdate() публичный Метод

Rope motion!
public PlatformerUpdate ( float delta ) : void
delta float
Результат void

SpeedToSectionOffset() публичный Метод

Conversion factor
public SpeedToSectionOffset ( float speed ) : float
speed float
Результат float

Start() публичный Метод

public Start ( ) : void
Результат void

UpdateRotation() публичный Метод

Update rope rotation, this is called PlatformerUpdate if you need to called it outside, remember that time must be updated before
public UpdateRotation ( ) : void
Результат void

Описание свойств

angleLimits публичное свойство

Min rope angle.
public float angleLimits
Результат float

easing публичное свойство

rope rotation easing
public EasingType easing
Результат EasingType

onBreakRope публичное свойство

When rope is broken
public RopeCallback onBreakRope
Результат RopeCallback

onSideReached публичное свойство

When a side is reached (before change waving)
public RopeCallback onSideReached
Результат RopeCallback

passengers публичное свойство

Object that can be 'atachhed' to the rope This allow to create rope in background, for example.
public LayerMask,UnityEngine passengers
Результат UnityEngine.LayerMask

ropeMass публичное свойство

The mass of each rope segment (except the last which has mass = ropeMass * 5).
public float ropeMass
Результат float

sectionPrefab публичное свойство

The prefab to use for each rope section (i.e. put the mesh or sprite here)..
public GameObject,UnityEngine sectionPrefab
Результат UnityEngine.GameObject

segmentLength публичное свойство

The length of the rope..
public float segmentLength
Результат float

segments публичное свойство

The number of segments..
public int segments
Результат int

stop публичное свойство

rope is stopped
public bool stop
Результат bool

usedFixedPosition публичное свойство

If true only the bottom section of the rope will be grabable and will have a fixed position..
public bool usedFixedPosition
Результат bool