public mg_ss_ConveyorSpeedData(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_Resources.LoadXMLClass(this, xmlNode); mg_ss_ConveyorTimeData mg_ss_ConveyorTimeData2 = null; foreach (XmlElement item in xmlNode.ChildNodes.OfType <XmlElement>()) { if (TimeDataHead == null) { TimeDataHead = new mg_ss_ConveyorTimeData(); mg_ss_ConveyorTimeData2 = TimeDataHead; } else { mg_ss_ConveyorTimeData2.NextData = new mg_ss_ConveyorTimeData(); mg_ss_ConveyorTimeData2 = mg_ss_ConveyorTimeData2.NextData; } mg_ss_Resources.LoadXMLClass(mg_ss_ConveyorTimeData2, item); } }
public void Initialize(mg_ss_GameScreen p_screen, mg_ss_ConveyorSpeedData p_speedData) { m_speedData = p_speedData; m_timeData = m_speedData.TimeDataHead; m_conveyorObject = p_screen.ConveyorObject; m_speedMultiplier = 1f; }
public void CheckSpeedIncrease(float p_gameTime) { if (m_timeData.NextData != null && m_timeData.NextData.MinTime <= p_gameTime) { m_timeData = m_timeData.NextData; DisneyMobile.CoreUnitySystems.Logger.LogInfo(this, "Conveyor Speed Tier Increase " + m_timeData.Speed, DisneyMobile.CoreUnitySystems.Logger.TagFlags.GAME); } }