コード例 #1
0
    void Update()
    {
        if (playerInlift)
        {
            LiftActivation();
        }

        if (timer < timeDoorsClose)
        {
            liftDoorsTraking.DoorFollowing();
        }
        else
        {
            liftDoorsTraking.CloseDoors();
        }
    }
コード例 #2
0
    // 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();
        }
    }