Inheritance: UnityEngine.MonoBehaviour
        // Use this for initialization
        void Start()
        {
            _mouseController = GameObject.FindGameObjectWithTag ("UiReticle").GetComponent<Mouse_Controller> ();
            _gunController = gameObject.GetComponentInChildren<SpiritGun> ();
            _soundManager = GameObject.Find ("SoundManager").GetComponent<SoundManager> ();

            flashlightSound.clip = _soundManager.GetSFXSound(3);

            if (StartingState == State.GUN && _currentState != State.GUN)
            {
                _currentState = State.GUN;
                _mouseController.setEquipped(false);
                _gunController.setEquipped(true);
            }
            else if (StartingState == State.HAND && _currentState != State.HAND)
            {
                _currentState = State.HAND;
                _mouseController.setEquipped(true);
                _gunController.setEquipped(false);
            }

            //Get flashlight
            //_flashlight = GetComponentInChildren<Light>();

            if (FlashlightOn)
            {
                _flashlight.enabled = true;
                _GrabbablesLight.enabled = true;
            }
            else
            {
                _flashlight.enabled = false;
                _GrabbablesLight.enabled = false;
            }
        }
        // Use this for initialization
        void Start()
        {
            _ammoCount = 6;
            _firing = false;
            _reloading = false;
            _reloadTimer = 1;
            gunBarrelAnimator.enabled = false;
            //We start by spawning 6 bullets in.
            _bulletsArrayNav = 6;
            SpawnBullets();
            //Then we only want 0 to spawn.
            _bulletsArrayNav = 0;

            _soundManager = GameObject.Find ("SoundManager").GetComponent<SoundManager> ();
            gunShot.clip = _soundManager.GetGunSound(0);
        }
        // Use this for initialization
        void Start()
        {
            _soundManager = GameObject.Find ("SoundManager").GetComponent<SoundManager> ();
            fireSound.clip = _soundManager.GetSFXSound(3);

            EventManager.AddListener((int) GameManagerScript.GameEvents.ResetBoss, OnReset);
        }
Esempio n. 4
0
        // Use this for initialization
        void Start()
        {
            GunAnimator.SetInteger("Shot", 0);
            _equippedAnimator = GetComponent<Animator>();

            _soundManager = GameObject.Find ("SoundManager").GetComponent<SoundManager> ();
            gunSound.clip = _soundManager.GetGunSound(0);

            _ammoCountHud = GameObject.Find("AmmoCount").GetComponent<Text>();

            updateAmmoCountHud();

            EventManager.AddListener((int) GameManagerScript.GameEvents.LoadlastCheckpoint, OnLoadLastCheckpoint);
        }