DoorOpen.CloseDoor C# (CSharp) Method

CloseDoor() private method

private CloseDoor ( ) : IEnumerator
return IEnumerator
    IEnumerator CloseDoor()
    {
        open = false;
        startMarker = transform.position;
        transform.localPosition = Vector3.Lerp(startMarker, originalPosition, speed);
        yield return null;
    }

Usage Example

Ejemplo n.º 1
0
 private void OnTriggerExit(Collider other)
 {
     if (other.tag == "Ball")
     {
         currentWeightOnPlatform -= other.GetComponent <Rigidbody>().mass;
     }
     if (other.tag == "Chair")
     {
         currentWeightOnPlatform -= other.GetComponent <Rigidbody>().mass;
     }
     if (other.tag == "Player")
     {
         currentWeightOnPlatform -= other.GetComponent <Rigidbody>().mass;
     }
     door.CloseDoor();
 }
All Usage Examples Of DoorOpen::CloseDoor