private void Start() { mg_jr_GameLogic gameLogic = MinigameManager.GetActive <mg_JetpackReboot>().GameLogic; m_speed = gameLogic.ScrollingSpeed; mg_jr_Environment mg_jr_Environment2 = AddNewEnvironment(new mg_jr_EnvironmentID(EnvironmentType.FOREST, EnvironmentVariant.DEFAULT)); CurrentEnvironment = m_environments[mg_jr_Environment2.Id]; CurrentEnvironment.gameObject.SetActive(value: true); AddNewEnvironment(new mg_jr_EnvironmentID(EnvironmentType.FOREST, EnvironmentVariant.NIGHT)); AddNewEnvironment(new mg_jr_EnvironmentID(EnvironmentType.CAVE, EnvironmentVariant.DEFAULT)); AddNewEnvironment(new mg_jr_EnvironmentID(EnvironmentType.TOWN, EnvironmentVariant.DEFAULT)); AddNewEnvironment(new mg_jr_EnvironmentID(EnvironmentType.TOWN, EnvironmentVariant.NIGHT)); AddNewEnvironment(new mg_jr_EnvironmentID(EnvironmentType.WATER, EnvironmentVariant.DEFAULT)); AddNewEnvironment(new mg_jr_EnvironmentID(EnvironmentType.WATER, EnvironmentVariant.NIGHT)); }
private void ObstacleCollision() { if (!m_isInvincible && m_currentState == PenguinState.FLYING) { if (HasRobotPenguins()) { RemoveRobotPenguin(); BecomeInvincible(m_penguinData.InvincibilityDuration); StartBlinking(m_penguinData.InvincibilityDuration); mg_jr_GameLogic gameLogic = MinigameManager.GetActive <mg_JetpackReboot>().GameLogic; gameLogic.Odometer.ApplyDistancePenalty(); } else { KillPenguin(); } } }
private IEnumerator Start() { PlayerStats = m_playerStatPersitenceStrat.LoadOrCreate(); GoalManager = base.gameObject.AddComponent <mg_jr_GoalManager>(); SetMainCamera("mg_jr_MainCamera"); InputManager.Prepare(base.MainCamera); base.MainCamera.orthographicSize = 3.84f; base.MainCamera.transform.position = new Vector3(0f, 0f, -20f); base.MainCamera.transform.rotation = Quaternion.identity; GameObject resourceContainer = new GameObject("mg_jr_ResourceContainer"); resourceContainer.transform.parent = base.transform; m_resources.LoadTextResources(); UIManager.Instance.OpenScreen("mg_jr_SplashScreen", toShowDarkMask: false, null, null); yield return(0); m_resources.ResourceContainer = resourceContainer; yield return(StartCoroutine(m_resources.LoadResourcesCoRoutine())); GameObject musicManagerGo = new GameObject("mg_jr_MusicManager"); musicManagerGo.transform.parent = base.transform; MusicManager = musicManagerGo.AddComponent <mg_jr_MusicManager>(); MusicManager.CreateTracks(m_resources.MusicClips); GameObject gameWorld = m_resources.GetInstancedResource(mg_jr_ResourceList.GAME_WORLD_LOGIC); gameWorld.transform.parent = base.transform; m_gameLogic = gameWorld.GetComponent <mg_jr_GameLogic>(); if (m_gameLogic == null) { DisneyMobile.CoreUnitySystems.Logger.LogDebug(m_gameLogic, "JetpackReboot game world doesn't contain any game logic."); } yield return(0); MusicManager.SetVolume(MusicVolume); GameLogic.LoadInitialState(); }
public GameLogicStateLaunchPad(mg_jr_GameLogic _logic) : base(_logic) { base.IsTurboAllowed = true; base.IsGameInProgress = false; }
public GameLogicStateIdle(mg_jr_GameLogic _logic) : base(_logic) { base.IsGameInProgress = false; }
public GameLogicStateBossFight(mg_jr_GameLogic _logic) : base(_logic) { }
public GameLogicStateTransition(mg_jr_GameLogic _logic) : base(_logic) { }
public GameLogicStateEndingTurbo(mg_jr_GameLogic _logic) : base(_logic) { }
public GameLogicStateTurboMode(mg_jr_GameLogic _logic, mg_jr_Level _lastLevelInCurrentTurboSequence) : base(_logic) { Assert.NotNull(_lastLevelInCurrentTurboSequence, "Turbomode running without a valid end level"); m_lastLevelInCurrentTurboSequence = _lastLevelInCurrentTurboSequence; }
public GameLogicState(mg_jr_GameLogic _logic) { m_Logic = _logic; IsTurboAllowed = false; IsGameInProgress = true; }
public GameLogicStateNormalMode(mg_jr_GameLogic _logic) : base(_logic) { base.IsTurboAllowed = true; }
public void Init(mg_jr_ScrollingSpeed _scrolling, mg_jr_GameLogic _gameLogic) { m_scrolling = _scrolling; m_gameLogic = _gameLogic; }