Ejemplo n.º 1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.CompareTag("Player"))
     {
         // TODO Add fade in
         ZoneManager.LoadPreviousZone();
     }
 }
Ejemplo n.º 2
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);
         }
     }
 }
Ejemplo n.º 3
0
 public void RestartGame()
 {
     SharedInfo.RestartInfo();
     ZoneManager.LoadZone(0);
 }