private void LoadSpawnObject(mg_if_SpawnGroup p_spawnGroup, XmlNode p_xmlGroupNode) { foreach (XmlNode childNode in p_xmlGroupNode.ChildNodes) { p_spawnGroup.objects.Add(new mg_if_SpawnObject(childNode.Attributes["time"].Value, childNode.Attributes["type"].Value)); } }
private void SpawnPuffle(string p_text) { m_spawnGroup = m_spawnPuffle; m_spawnGroupIndex = 0; m_spawnGroupStartTime = m_runningTime; (m_puffleList[0] as mg_if_Puffle).SetText(p_text); }
public void MinigameUpdate(float p_deltaTime) { m_runningTime += p_deltaTime; UpdateList(m_fishList, p_deltaTime); UpdateList(m_kickerList, p_deltaTime); UpdateList(m_jellyfishList, p_deltaTime); UpdateList(m_sharkNearList, p_deltaTime); UpdateList(m_crabList, p_deltaTime); UpdateList(m_extraLifeList, p_deltaTime); if (m_sharkFar.State == mg_if_EObjectState.STATE_ACTIVE) { m_sharkFar.MinigameUpdate(p_deltaTime); } if (m_spawnGroup == null || m_runningTime > m_spawnGroupStartTime + m_spawnSpeed) { int num = Random.Range(0, m_spawnLevel); DisneyMobile.CoreUnitySystems.Logger.LogInfo(this, "Changing Spawn Group to " + num, DisneyMobile.CoreUnitySystems.Logger.TagFlags.GAME); m_spawnGroup = m_spawnTable[num]; m_spawnGroupIndex = 0; m_spawnGroupStartTime = m_runningTime; } while (m_spawnGroupIndex < m_spawnGroup.objects.Count) { mg_if_SpawnObject mg_if_SpawnObject2 = m_spawnGroup.objects[m_spawnGroupIndex]; if ((float)mg_if_SpawnObject2.Time / 1000f > m_runningTime - m_spawnGroupStartTime) { break; } if (mg_if_SpawnObject2.Type != 0) { SpawnObject(mg_if_SpawnObject2.Type); } m_spawnGroupIndex++; } }
private void LoadXML() { XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(SpawnData.text); XmlNodeList elementsByTagName = xmlDocument.GetElementsByTagName("puffle"); m_spawnPuffle = new mg_if_SpawnGroup(); LoadSpawnObject(m_spawnPuffle, elementsByTagName[0]); XmlNodeList elementsByTagName2 = xmlDocument.GetElementsByTagName("group"); foreach (XmlNode item in elementsByTagName2) { mg_if_SpawnGroup mg_if_SpawnGroup2 = new mg_if_SpawnGroup(); m_spawnTable.Add(mg_if_SpawnGroup2); LoadSpawnObject(mg_if_SpawnGroup2, item); } }
private void Start() { m_gameTransform = m_minigame.GetComponentInChildren <mg_if_GameLogic>().transform; m_spawnSpeed = m_minigame.Resources.Variables.StartSpawnSpeed; m_spawnLevel = 10; m_spawnGroup = null; m_spawnGroupIndex = 0; m_spawnGroupStartTime = 0f; m_runningTime = 0f; CreateGameObjects(); if (localizer != null) { SpawnPuffle(localizer.GetTokenTranslation("Activity.MiniGames.FishGoal")); } else { SpawnPuffle("Collect 10 fish to win!"); } }