Files
DougDiggem/Assets/Scripts/WorldInteraction/SceneDoor.cs
T
2026-03-07 14:42:14 -06:00

34 lines
781 B
C#

using UnityEngine;
public class SceneDoor : Interactable
{
// ID of THIS door
public int DoorId = 0;
// What scene does this door take us to?
public string SceneToLoad = "";
// Which door does this lead to in the scene this door takes us to?
public int IdOfCorrespondingDoor = 0;
// transform that the character should walk towards when entering the room
// through this door
public Transform WalkDirection;
public override void Interact()
{
// Do nothing
}
public override void MoveInsideRange()
{
if (!GameManager.Instance.InSceneTransition())
GameManager.Instance.EnterSceneDoor(SceneToLoad, DoorId);
}
public override void MoveOutsideRange()
{
// Do nothing
}
}