public virtual bool NextLevel() { TruckNumber.SetValue(TruckNumber.Value + 1); if (TruckNumber.Value > m_levels.Count) { return(false); } m_activeLevel = m_levels[TruckNumber.Value - 1]; CurrentDropAllowance.SetValue(m_activeLevel.DropAllowance); return(true); }
public virtual void Awake() { CurrentDropAllowance = new mg_bc_UIValue <int>(); ParseXML(); m_restingLocation = base.gameObject.transform.localPosition; m_spawnLocation = base.transform.Find("mg_bc_object_spawn").localPosition; m_spawnLocation.x += m_restingLocation.x; m_spawnLocation.y += m_restingLocation.y; m_availableSpriteLayers = new Queue <int>(); for (int i = 21; i < 79; i++) { m_availableSpriteLayers.Enqueue(i); } IsSpawning = true; m_isFlyingPowerup = false; CanSpawnLives = true; CanSpawnShield = true; TruckNumber.SetValue(0); NextLevel(); }