// Use this for initialization void Start() { // find platform from parent if (!platform) { platform = gameObject.GetComponentInParent<Elevator_Platform>(); } }
// Code that runs on entering the state. public override void OnEnter() { platform = Owner.GetComponent<Elevator_Platform>(); // show case information platform.Get_Elevator().showCaseInfo = platform.nextLevel.levelRef; currentTime = waitingTime; }
// Code that runs on entering the state. public override void OnEnter() { platform = Owner.GetComponent<Elevator_Platform>(); // open the outter door CloseOutter(); // open the inter door CloseInner(); currentTime = delayTime; }
// Code that runs on entering the state. public override void OnEnter() { platform = Owner.GetComponent<Elevator_Platform>(); // need to find the next level if (!platform.nextLevel) { Fsm.Event(findNextLevel); } // move to platform.MoveTo(); }
// Use this for initialization void Start() { // make dictionary MakeDictionary(); // find platform in children if (!platform) { platform = gameObject.GetComponentInChildren<Elevator_Platform>(); } // initial the next level nextLevel = levels[startAtLevelIndex]; }
// Code that runs on entering the state. public override void OnEnter() { platform = Owner.GetComponent<Elevator_Platform>(); currentTime = delayTime; }