// Use this for initialization void Start() { // elevator = GameObject.FindGameObjectWithTag ("Elevator").GetComponent<ElevatorAnimatable> (); elevator = gameObject.GetComponentInChildren <ElevatorAnimatable>(); currentIndex = 0; speed = 2f; movingDown = false; movingUp = true; isClosed = true; spawned = false; }
void Start() { elevator = GameObject.FindGameObjectWithTag("Elevator").GetComponent <ElevatorAnimatable> (); }