Exemplo n.º 1
0
 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();
     }
 }
Exemplo n.º 2
0
 public void CreatePrimaryWorld()
 {
     PrimaryWorld = WorldFactory.CreatePrimaryWorld(worldID);
     PrimaryWorldCollisionDetection = new CollisionDetection(PrimaryWorld);
 }