Пример #1
0
 private void StartDungeonMusic(OnPortalEntered data)
 {
     isPlayerInDungeon = true;
     musicSpeaker.clip = dungeonMusic;
     musicSpeaker.PlayDelayed(1);
     musicSpeaker.loop = true;
 }
 private void EnterPortal(OnPortalEntered eventData)
 {
     Enemy.numberOfEnemies = 0;
     currentWorldLevel++;
     EventManager.Instance.TriggerEvent(new OnPlayerTeleportation(new Vector3(0, 11, 0)));
     SaveManager.Instance.SaveGame(playerName);
 }
Пример #3
0
 public void On(OnPortalEntered portal)
 {
     if (portal.kind == Portal.Kind.BonusLevelEntry)
     {
         globalState.profiles[PlayerProfile.Explorer] += onPathChangeBonus;
     }
 }
Пример #4
0
 public void On(OnPortalEntered message)
 {
     if (portalAudioSource)
     {
         portalAudioSource.Play();
     }
 }
 public void On(OnPortalEntered portal)
 {
     if (portal.kind == Portal.Kind.BonusLevelEntry && GlobalState.instance.currentGameMode == GameMode.Story)
     {
         LoadLevel(portal.storyModeNextLevelScene, pauseTimeWhileLoading: false);
     }
     else if (portal.kind == Portal.Kind.BonusLevelEntry && GlobalState.instance.currentGameMode == GameMode.Endless)
     {
         LoadNextBonusLevel();
     }
     else if (GlobalState.instance.currentGameMode == GameMode.Story)
     {
         LoadLevel(portal.storyModeNextLevelScene, pauseTimeWhileLoading: false);
     }
     else if (GlobalState.instance.currentGameMode == GameMode.Endless)
     {
         LoadNextEndlessModeScene();
     }
 }