public void Start()
        {
			AudioManager.instance.Play(AudioBank.MUS_NONE, this.gameObject);
            AudioManager.instance.Play(AudioBank.SFX_SHIP_IDLE, this.gameObject);
            if (leveler == null)
                throw new Exception("leveler is null.");

            if (headlights == null)
                throw new Exception("headLights is null.");

            if (autoLevelIndicator == null)
                throw new Exception("autoLevelIndicator is null.");

            if (headlightsIndicator == null)
                throw new Exception("headlightsIndicator is null.");

            weaponryController = GetComponent<PlayerShipWeaponryController>();
            if (weaponryController == null)
                throw new Exception("weaponryController is null.");

            rb = GetComponent<Rigidbody>();

            PauseManager.OnPause += Pause;
            PauseManager.OnUnpause += Unpause;

            // Controls should be unlocked by the game manager.
            lockControls = true;
        }
 public override bool OnCatchInternal(PlayerShipWeaponryController playerShipWeaponryController)
 {
     AudioManager.instance.Play(AudioBank.SFX_ITEM_AMMO, this.gameObject);
     //SoundFxsManager.instance.PlayOneShot(SoundFx.ItemCatch, transform.position);
     playerShipWeaponryController.IncreaseGuidedMissilesAmmo(amount);
     return true;
 }
Пример #3
0
 public void OnCatch(PlayerShipWeaponryController playerShipWeaponryController)
 {
     if (OnCatchInternal(playerShipWeaponryController))
     {
         Destroy(gameObject);
     }
 }
Пример #4
0
 private void Start()
 {
     playerShipWeaponryController = GetComponent <PlayerShipWeaponryController>();
     if (playerShipWeaponryController == null)
     {
         throw new Exception("PlayerShipItemCatcher playerShipWeaponryController'is null.");
     }
 }
        public override bool OnCatchInternal(PlayerShipWeaponryController playerShipWeaponryController)
        {
            if (playerShipWeaponryController.IsShieldAtMaxValue)
            {
                return false;
            }
            AudioManager.instance.Play(AudioBank.SFX_ITEM_ENERGY, this.gameObject);

            Invoke("BoostShield", 0.2f);
            //SoundFxsManager.instance.PlayOneShot(SoundFx.ItemCatch, transform.position);
            playerShipWeaponryController.IncreaseShield(increaseValue);
            return true;
        }
Пример #6
0
        public void Start()
        {
            AudioManager.instance.Play(AudioBank.MUS_NONE, this.gameObject);
            AudioManager.instance.Play(AudioBank.SFX_SHIP_IDLE, this.gameObject);
            if (leveler == null)
            {
                throw new Exception("leveler is null.");
            }

            if (headlights == null)
            {
                throw new Exception("headLights is null.");
            }

            if (autoLevelIndicator == null)
            {
                throw new Exception("autoLevelIndicator is null.");
            }

            if (headlightsIndicator == null)
            {
                throw new Exception("headlightsIndicator is null.");
            }

            weaponryController = GetComponent <PlayerShipWeaponryController>();
            if (weaponryController == null)
            {
                throw new Exception("weaponryController is null.");
            }

            rb = GetComponent <Rigidbody>();

            PauseManager.OnPause   += Pause;
            PauseManager.OnUnpause += Unpause;

            // Controls should be unlocked by the game manager.
            lockControls = true;
        }
 private void Start()
 {
     playerShipWeaponryController = GetComponent<PlayerShipWeaponryController>();
     if (playerShipWeaponryController == null)
         throw new Exception("PlayerShipItemCatcher playerShipWeaponryController'is null.");
 }
Пример #8
0
 public abstract bool OnCatchInternal(PlayerShipWeaponryController playerShipWeaponryController);