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); }
public void On(OnPortalEntered portal) { if (portal.kind == Portal.Kind.BonusLevelEntry) { globalState.profiles[PlayerProfile.Explorer] += onPathChangeBonus; } }
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(); } }