private void Interact(InputAction.CallbackContext c) { Tooltip.Message = ""; if (transitionOnOff) { if (locked) { CheckKey(); } if (player != null && !locked) //Make sure it's not null, check if door is locked { if (player.myRoom == room1) //Check the room states then update as necessary { CameraCrossfade(player.gameObject, entrancePointRoom, player, room2); room2.SnowParticleSwitch(room2.roomName); // turn on or off the snow effect in the room // still testing room1.SnowParticleSwitch(room1.roomName); // turn on or off the snow effect in the room // still testing if (manager != null) { manager.Play("Door Open", true); } Debug.Log("outside if"); if (floorChanger) { Debug.Log("inside if"); player.playerFloor = destString; } } else// player.myRoom == room2 { CameraCrossfade(player.gameObject, entrancePointRoom, player, room1); room2.SnowParticleSwitch(room2.roomName); // turn on or off the snow effect in the room room1.SnowParticleSwitch(room1.roomName); // turn on or off the snow effect in the room if (manager != null) { manager.Play("Door Open", true); } Debug.Log("outside if"); if (floorChanger) { Debug.Log("inside if"); player.playerFloor = destString; } } } } }