Beispiel #1
0
        private void Downgrade()
        {
            var previousType = m_behaviour.Type;

            switch (previousType)
            {
            case WeaponType.Bomb:
                m_behaviour = WeaponFactory.GetCurrentWeapon(WeaponType.Laser);
                break;

            case WeaponType.Cross:
                m_behaviour = WeaponFactory.GetCurrentWeapon(WeaponType.Bomb);
                break;

            default:
                break;
            }

            TryUpdateWeapon(previousType);
        }
Beispiel #2
0
        public void Upgrade()
        {
            SoundManager.PlaySoundEffect("PowerUpCollected");

            var previousType = m_behaviour.Type;

            switch (previousType)
            {
            case WeaponType.Laser:
                m_behaviour = WeaponFactory.GetCurrentWeapon(WeaponType.Bomb);
                break;

            case WeaponType.Bomb:
                m_behaviour = WeaponFactory.GetCurrentWeapon(WeaponType.Cross);
                break;

            default:
                break;
            }

            TryUpdateWeapon(previousType);
        }
Beispiel #3
0
 void Start()
 {
     m_behaviour     = WeaponFactory.GetCurrentWeapon(WeaponType.Laser);
     m_downgradeTime = Time.time;
 }