void Update() { if (playerInlift) { LiftActivation(); } if (timer < timeDoorsClose) { liftDoorsTraking.DoorFollowing(); } else { liftDoorsTraking.CloseDoors(); } }
// Update is called once per frame void Update() { // If the player is in the lift... if (playerInLift) { // ... activate the lift. LiftActivation(); } // If the timer is less than the time before the doors close... if (timer < timeToDoorsClose) { // ... the inner doors should follow the outer doors. liftDoorsTracking.DoorFollowing(); } else { // Otherwise the doors should close. liftDoorsTracking.CloseDoors(); } }