Ejemplo n.º 1
0
 private void CalculateTotalTime()
 {
     ChaosTotalTime = 0f;
     for (mg_ss_ChaosModeData mg_ss_ChaosModeData2 = m_dataHead; mg_ss_ChaosModeData2 != null; mg_ss_ChaosModeData2 = mg_ss_ChaosModeData2.NextData)
     {
         ChaosTotalTime += mg_ss_ChaosModeData2.TimeActive;
     }
 }
Ejemplo n.º 2
0
 public void Initialize(mg_ss_GameLogic p_logic, mg_ss_PlayerObject p_playerObject)
 {
     m_logic          = p_logic;
     m_dataHead       = m_logic.Minigame.Resources.ChaosModeData;
     m_chaosAnimation = new mg_ss_ChaosAnimation();
     m_chaosAnimation.Initialize(p_playerObject);
     CalculateTotalTime();
     Reset();
 }
Ejemplo n.º 3
0
 private void Reset()
 {
     Activated              = false;
     ApplesCollected        = Mathf.Max(0, ApplesCollected - 5);
     ActivationTimer        = 0f;
     m_lastFruitSpawnDelay  = 0.2f;
     m_lastSpawnTime        = 0f;
     m_currentData          = m_dataHead;
     m_currentTierTotalTime = m_currentData.TimeActive;
     m_chaosAnimation.Reset();
     m_logic.OnChaosModeEnded();
 }
Ejemplo n.º 4
0
 private void CheckTierIncrease()
 {
     if (ActivationTimer >= m_currentTierTotalTime)
     {
         if (m_currentData.NextData == null)
         {
             Reset();
             return;
         }
         m_currentData           = m_currentData.NextData;
         m_currentTierTotalTime += m_currentData.TimeActive;
     }
 }
Ejemplo n.º 5
0
 private void LoadSharedResources()
 {
     if (!m_hasLoadedShared)
     {
         LoadResource("SmoothieSmash/mg_ss_pf_Game", mg_ss_EResourceList.GAME_GENERIC);
         LoadResource("SmoothieSmash/mg_ss_pf_fruit_apple", mg_ss_EResourceList.GAME_ITEM_APPLE);
         LoadResource("SmoothieSmash/mg_ss_pf_fruit_banana", mg_ss_EResourceList.GAME_ITEM_BANANA);
         LoadResource("SmoothieSmash/mg_ss_pf_fruit_blackberry", mg_ss_EResourceList.GAME_ITEM_BLACKBERRY);
         LoadResource("SmoothieSmash/mg_ss_pf_fruit_blueberry", mg_ss_EResourceList.GAME_ITEM_BLUEBERRY);
         LoadResource("SmoothieSmash/mg_ss_pf_fruit_fig", mg_ss_EResourceList.GAME_ITEM_FIG);
         LoadResource("SmoothieSmash/mg_ss_pf_fruit_grapes", mg_ss_EResourceList.GAME_ITEM_GRAPES);
         LoadResource("SmoothieSmash/mg_ss_pf_fruit_mango", mg_ss_EResourceList.GAME_ITEM_MANGO);
         LoadResource("SmoothieSmash/mg_ss_pf_fruit_orange", mg_ss_EResourceList.GAME_ITEM_ORANGE);
         LoadResource("SmoothieSmash/mg_ss_pf_fruit_peach", mg_ss_EResourceList.GAME_ITEM_PEACH);
         LoadResource("SmoothieSmash/mg_ss_pf_fruit_pineapple", mg_ss_EResourceList.GAME_ITEM_PINEAPPLE);
         LoadResource("SmoothieSmash/mg_ss_pf_fruit_rasberry", mg_ss_EResourceList.GAME_ITEM_RASPBERRY);
         LoadResource("SmoothieSmash/mg_ss_pf_fruit_strawberry", mg_ss_EResourceList.GAME_ITEM_STRAWBERRY);
         LoadResource("SmoothieSmash/mg_ss_pf_golden_apple", mg_ss_EResourceList.GAME_ITEM_GOLDEN_APPLE);
         LoadResource("SmoothieSmash/mg_ss_pf_golden_apple_rotation", mg_ss_EResourceList.GAME_GOLDEN_APPLE_ROTATE);
         LoadResource("SmoothieSmash/mg_ss_pf_combotext_01", mg_ss_EResourceList.COMBO_01);
         LoadResource("SmoothieSmash/mg_ss_pf_combotext_02", mg_ss_EResourceList.COMBO_02);
         LoadResource("SmoothieSmash/mg_ss_pf_combotext_03", mg_ss_EResourceList.COMBO_03);
         LoadResource("SmoothieSmash/mg_ss_pf_combotext_04", mg_ss_EResourceList.COMBO_04);
         LoadResource("SmoothieSmash/mg_ss_pf_combotext_05", mg_ss_EResourceList.COMBO_05);
         LoadResource("SmoothieSmash/mg_ss_pf_combotext_06", mg_ss_EResourceList.COMBO_06);
         LoadResource("SmoothieSmash/mg_ss_pf_combotext_07", mg_ss_EResourceList.COMBO_07);
         LoadResource("SmoothieSmash/mg_ss_pf_combotext_08", mg_ss_EResourceList.COMBO_08);
         LoadResource("SmoothieSmash/mg_ss_pf_combotext_09", mg_ss_EResourceList.COMBO_09);
         LoadResource("SmoothieSmash/mg_ss_pf_combotext_10", mg_ss_EResourceList.COMBO_10);
         LoadResource("SmoothieSmash/mg_ss_pf_splatter_blob", mg_ss_EResourceList.GAME_SPLAT_BLOB);
         LoadResource("SmoothieSmash/mg_ss_pf_splatter_splat", mg_ss_EResourceList.GAME_SPLAT);
         LoadResource("SmoothieSmash/mg_ss_pf_splatter_splat_little", mg_ss_EResourceList.GAME_SPLAT_LITTLE);
         LoadResource("SmoothieSmash/mg_ss_pf_GameSounds", mg_ss_EResourceList.GAME_GENERIC_SOUNDS);
         LoadResource("SmoothieSmash/mg_ss_pf_GameSounds_Single", mg_ss_EResourceList.GAME_GENERIC_SOUNDS_SINGLE);
         LoadSharedSounds();
         ChaosModeData = new mg_ss_ChaosModeData();
         ChaosModeData.LoadXML("SmoothieSmash/mg_ss_ChaosModeData");
         CoinTierData = new mg_ss_CoinTierData();
         CoinTierData.LoadXML("SmoothieSmash/mg_ss_CoinTierData");
         m_hasLoadedShared = true;
     }
 }
Ejemplo n.º 6
0
        public void LoadXML(string p_xmlPath)
        {
            TextAsset   textAsset   = Resources.Load(p_xmlPath) as TextAsset;
            XmlDocument xmlDocument = new XmlDocument();

            xmlDocument.LoadXml(textAsset.text);
            XmlNode             xmlNode = xmlDocument.SelectSingleNode("/data");
            mg_ss_ChaosModeData mg_ss_ChaosModeData2 = null;

            foreach (XmlElement item in xmlNode.ChildNodes.OfType <XmlElement>())
            {
                if (mg_ss_ChaosModeData2 == null)
                {
                    mg_ss_ChaosModeData2 = this;
                }
                else
                {
                    mg_ss_ChaosModeData2.NextData = new mg_ss_ChaosModeData();
                    mg_ss_ChaosModeData2          = mg_ss_ChaosModeData2.NextData;
                }
                mg_ss_Resources.LoadXMLClass(mg_ss_ChaosModeData2, item);
            }
        }