Exemple #1
0
    /*
     * Moved GetComponent to coroutine it is bad practice and expensive (in case of batch of colliders)
     * to use the method in Update
     */
    IEnumerator InvokeRotation(BoxCollider collider)
    {
        DoorOpenClose door = collider.GetComponent <DoorOpenClose>();

        door.StartRotation();
        yield return(null);
    }