public override void exitLight() { base.exitLight(); if (!activated) { anim.SetTrigger(notIlumHash); thisDoor.startClosing(); } }
private void OnTriggerEnter(Collider other) { if (other.gameObject.tag == "door") { GameObject door = other.gameObject; DoorMovement dMove = door.GetComponent <DoorMovement>(); dMove.startClosing(); rotatorCube.GetComponent <MovingWithMouse>().doors.Add(door); StartCoroutine(dMove.UnloadAsyncScene()); } }