Example #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (_ignoreFirst && (_ignoreFirstFromScene == -1 || _ignoreFirstFromScene == SharedInfo.PreviousScene))
     {
         _ignoreFirst = false;
     }
     else
     {
         if (_canAdvance && collision.CompareTag("Player"))
         {
             SharedInfo.PreviousScene          = SharedInfo.CurrentScene;
             SharedInfo.CurrentScene           = _zoneId;
             SharedInfo.PlayerStartingPosition = _playerStartingPosition;
             SharedInfo.CameraStartingPosition = _cameraStartingPosition;
             ZoneManager.LoadZone(_zoneId);
         }
     }
 }
Example #2
0
 public void RestartGame()
 {
     SharedInfo.RestartInfo();
     ZoneManager.LoadZone(0);
 }