コード例 #1
0
        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));
        }
コード例 #2
0
 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();
         }
     }
 }
コード例 #3
0
        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();
        }
コード例 #4
0
 public GameLogicStateLaunchPad(mg_jr_GameLogic _logic)
     : base(_logic)
 {
     base.IsTurboAllowed   = true;
     base.IsGameInProgress = false;
 }
コード例 #5
0
 public GameLogicStateIdle(mg_jr_GameLogic _logic)
     : base(_logic)
 {
     base.IsGameInProgress = false;
 }
コード例 #6
0
 public GameLogicStateBossFight(mg_jr_GameLogic _logic)
     : base(_logic)
 {
 }
コード例 #7
0
 public GameLogicStateTransition(mg_jr_GameLogic _logic)
     : base(_logic)
 {
 }
コード例 #8
0
 public GameLogicStateEndingTurbo(mg_jr_GameLogic _logic)
     : base(_logic)
 {
 }
コード例 #9
0
 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;
 }
コード例 #10
0
 public GameLogicState(mg_jr_GameLogic _logic)
 {
     m_Logic          = _logic;
     IsTurboAllowed   = false;
     IsGameInProgress = true;
 }
コード例 #11
0
 public GameLogicStateNormalMode(mg_jr_GameLogic _logic)
     : base(_logic)
 {
     base.IsTurboAllowed = true;
 }
コード例 #12
0
 public void Init(mg_jr_ScrollingSpeed _scrolling, mg_jr_GameLogic _gameLogic)
 {
     m_scrolling = _scrolling;
     m_gameLogic = _gameLogic;
 }