C# 클래스 GoSpline, GoKit

파일 보기 프로젝트 열기: prime31/GoKit 1 사용 예제들

공개 메소드들

메소드 설명
GoSpline ( List nodes, bool useStraightLines = false ) : System.Collections
GoSpline ( Vector3 nodes, bool useStraightLines = false ) : System.Collections
GoSpline ( string pathAssetName, bool useStraightLines = false ) : System.Collections
buildPath ( ) : void

responsible for calculating total length, segmentStartLocations and segmentDistances

bytesToVector3List ( byte bytes ) : List

helper to get a node list from an asset created with the visual editor

closePath ( ) : void

closes the path adding a new node at the end that is equal to the start node if it isn't already equal

drawGizmos ( Vector3 path, float resolution = 50 ) : void

helper for drawing gizmos in the editor

drawGizmos ( float resolution ) : void
getLastNode ( ) : Vector3

gets the last node. used to setup relative tweens

getPointOnPath ( float t ) : Vector3

returns the point that corresponds to the given t where t >= 0 and t <= 1 making sure that the path is traversed at a constant speed.

reverseNodes ( ) : void

reverses the order of the nodes

unreverseNodes ( ) : void

unreverses the order of the nodes if they were reversed

비공개 메소드들

메소드 설명
getPoint ( float t ) : Vector3

directly gets the point for the current spline type with no lookup table to adjust for constant speed

nodeListFromAsset ( string pathAssetName ) : List

helper to get a node list from an asset created with the visual editor

메소드 상세

GoSpline() 공개 메소드

public GoSpline ( List nodes, bool useStraightLines = false ) : System.Collections
nodes List
useStraightLines bool
리턴 System.Collections

GoSpline() 공개 메소드

public GoSpline ( Vector3 nodes, bool useStraightLines = false ) : System.Collections
nodes Vector3
useStraightLines bool
리턴 System.Collections

GoSpline() 공개 메소드

public GoSpline ( string pathAssetName, bool useStraightLines = false ) : System.Collections
pathAssetName string
useStraightLines bool
리턴 System.Collections

buildPath() 공개 메소드

responsible for calculating total length, segmentStartLocations and segmentDistances
public buildPath ( ) : void
리턴 void

bytesToVector3List() 공개 정적인 메소드

helper to get a node list from an asset created with the visual editor
public static bytesToVector3List ( byte bytes ) : List
bytes byte
리턴 List

closePath() 공개 메소드

closes the path adding a new node at the end that is equal to the start node if it isn't already equal
public closePath ( ) : void
리턴 void

drawGizmos() 공개 정적인 메소드

helper for drawing gizmos in the editor
public static drawGizmos ( Vector3 path, float resolution = 50 ) : void
path Vector3
resolution float
리턴 void

drawGizmos() 공개 메소드

public drawGizmos ( float resolution ) : void
resolution float
리턴 void

getLastNode() 공개 메소드

gets the last node. used to setup relative tweens
public getLastNode ( ) : Vector3
리턴 Vector3

getPointOnPath() 공개 메소드

returns the point that corresponds to the given t where t >= 0 and t <= 1 making sure that the path is traversed at a constant speed.
public getPointOnPath ( float t ) : Vector3
t float
리턴 Vector3

reverseNodes() 공개 메소드

reverses the order of the nodes
public reverseNodes ( ) : void
리턴 void

unreverseNodes() 공개 메소드

unreverses the order of the nodes if they were reversed
public unreverseNodes ( ) : void
리턴 void