private void OrderCompleted(bool p_specialOrder) { m_itemGenerator.OrderCompleted(p_specialOrder); m_ordersCompleted++; if (m_orderData.NextData != null && m_orderData.NextData.MinRecipesCompleted <= m_ordersCompleted) { m_orderData = m_orderData.NextData; } GenerateOrder(); }
public void Initialize(mg_ss_ItemGenerator_Normal p_itemGenerator, mg_ss_OrderSystemObject p_orderSystemObject) { m_itemGenerator = p_itemGenerator; m_orderSystemObject = p_orderSystemObject; mg_ss_Resources resources = MinigameManager.GetActive <mg_SmoothieSmash>().Resources; m_orderData = resources.OrderLengthData; m_specialOrderData = resources.SpecialOrderData; m_currentOrder = new mg_ss_Order(); m_nextOrder = new mg_ss_Order(); m_orderSystemObject.Initialize(m_currentOrder); GenerateNextGenericOrder(); GenerateOrder(); m_ordersCompleted = 0; }
private void LoadGameResources_Normal() { LoadResource("SmoothieSmash/mg_ss_pf_GameNormal", mg_ss_EResourceList.GAME_SPECIFIC); LoadResource("SmoothieSmash/mg_ss_pf_GameSounds_Single_Normal", mg_ss_EResourceList.GAME_SPECIFIC_SOUNDS_SINGLE); LoadResource("SmoothieSmash/mg_ss_pf_clock", mg_ss_EResourceList.GAME_ITEM_CLOCK); LoadResource("SmoothieSmash/mg_ss_pf_aunt_arctic", mg_ss_EResourceList.GAME_AUNT_ARTIC); LoadResource("SmoothieSmash/mg_ss_pf_rock_hopper", mg_ss_EResourceList.GAME_ROCK_HOPPER); LoadResource("SmoothieSmash/mg_ss_pf_herbert", mg_ss_EResourceList.GAME_HERBERT); ConveyorSpeedData = new mg_ss_ConveyorSpeedData("SmoothieSmash/mg_ss_ConveyorSpeedData_Normal"); ItemGeneratorData = new mg_ss_ItemGeneratorData(); ItemGeneratorData.LoadXML("SmoothieSmash/mg_ss_ItemGeneratorData_Normal"); OrderLengthData = new mg_ss_OrderLengthData(); OrderLengthData.LoadXML("SmoothieSmash/mg_ss_OrderLengthData"); SpecialOrderData = new mg_ss_SpecialOrderData(); SpecialOrderData.LoadXML("SmoothieSmash/mg_ss_SpecialOrderData"); }
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_OrderLengthData mg_ss_OrderLengthData2 = null; foreach (XmlElement item in xmlNode.ChildNodes.OfType <XmlElement>()) { if (mg_ss_OrderLengthData2 == null) { mg_ss_OrderLengthData2 = this; } else { mg_ss_OrderLengthData2.NextData = new mg_ss_OrderLengthData(); mg_ss_OrderLengthData2 = mg_ss_OrderLengthData2.NextData; } mg_ss_Resources.LoadXMLClass(mg_ss_OrderLengthData2, item); } }