C# 클래스 UnityPlatformer.Rope

Rope tile
상속: UnityEngine.MonoBehaviour, IUpdateEntity
파일 보기 프로젝트 열기: llafuente/unity-platformer

공개 프로퍼티들

프로퍼티 타입 설명
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