public void Reset() { if (CanReset && State is WorldState) { State = new WorldState(this); CanReset = false; Time = Utils.Instance.InitialTimeLeft; Player = new Player(); PrimaryWorld = WorldFactory.CreatePrimaryWorld(worldID); PrimaryWorldCollisionDetection = new CollisionDetection(PrimaryWorld); HiddenWorld = WorldFactory.CreateHiddenWorld(worldID); HiddenWorldCollisionDetection = new CollisionDetection(HiddenWorld); if (InPrimaryWorld) { Player.MovementState.Location = PrimaryWorld.PlayerSpawn; } else { Player.MovementState.Location = HiddenWorld.PlayerSpawn; } remainingResetTime = Utils.Instance.PauseTime; SongManager.Instance.PlayOverworldMusic(); } }
public void CreateHiddenWorld() { HiddenWorld = WorldFactory.CreateHiddenWorld(worldID); HiddenWorldCollisionDetection = new CollisionDetection(HiddenWorld); }