protected override void teardown() { UnityEngine.Object.Destroy(railObject); railObject = null; rail = null; pilot = null; framesRemaining = 0; }
private void Awake() { if (Rail == null) { Rail = GetComponent <SmoothBezierCurve>(); } Debug.Assert(Rail != null, "Dolly camera requires a rail to move on."); calculateRailLengths(); Active = false; Timer = 0f; }
protected override void setup() { if (RailPrefab == null) { throw new ArgumentNullException("RailPrefrab", "No rail prefab set"); } railObject = UnityEngine.Object.Instantiate(RailPrefab, RailPosition, Quaternion.Euler(RailRotation)); rail = railObject.GetComponent <SmoothBezierCurve>(); pilot = new GameObject("Flyover").transform; pilot.SetParent(railObject.transform); CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>(); GameObject gameObject = cPDataEntityCollection.GetComponent <GameObjectReferenceData>(cPDataEntityCollection.LocalPlayerHandle).GameObject; FollowAction followAction = gameObject.AddComponent <FollowAction>(); followAction.PilotTransform = pilot; followAction.SetRotation = false; followAction.UseVelAsFacing = true; followAction.enabled = true; }
public void Awake() { rail = GetComponent <SmoothBezierCurve>(); }
public abstract void VisitSmoothBezierCurve( SmoothBezierCurve smoothCurve );