Inheritance: UnityEngine.MonoBehaviour
        // Use this for initialization
        void Awake()
        {
            pwm = this;

            leftShot = leftBarrel.GetComponent<PlayerShooting> ();
            rightShot = rightBarrel.GetComponent<PlayerShooting> ();
            centerShot = centerBarrel.GetComponent<PlayerShooting> ();
        }
        void Awake()
        {
            // Setting up the references.
            anim = GetComponent <Animator> ();
            playerAudio = GetComponent <AudioSource> ();
            playerMovement = GetComponent <PlayerMovement> ();
            playerShooting = GetComponentInChildren <PlayerShooting> ();

            // Set the initial health of the player.
            currentHealth = startingHealth;
        }
Ejemplo n.º 3
0
        void Awake()
        {
            // Setting up the references.
            anim = GetComponent<Animator>();
            playerMovement = GetComponent<PlayerMovement>();
            playerShooting = GetComponentInChildren<PlayerShooting>();
            hurtAudio = FMOD_StudioSystem.instance.GetEvent("event:/sfx/player/playerHit");

            // Set the initial health of the player.
            currentHealth = startingHealth;
        }
        // Use this for initialization
        void Awake()
        {
            Decoy.clearDecoys();
            player = this;

            leftShot = leftBarrel.GetComponent<PlayerShooting>();
            centerShot = centerBarrel.GetComponent<PlayerShooting>();
            rightShot = rightBarrel.GetComponent<PlayerShooting>();
            weaponTime = 0;
            resetWeapon();
        }
Ejemplo n.º 5
0
		void Awake ()
		{
			anim = GetComponent <Animator> ();
			playerAudio = GetComponent <AudioSource> ();
			playerMovement = GetComponent <PlayerMovement> ();
			playerShooting = GetComponentInChildren <PlayerShooting> ();
			shieldBuff = GetComponent<ShieldBuff> ();
			updateSlider = healthSlider.GetComponent<UpdateSlider> ();

			currentHealth = startingHealth;
		}
Ejemplo n.º 6
0
		void Awake()
		{
			playerShooting = gunBarrellEnd.GetComponent<PlayerShooting> ();
			playerMovement = player.GetComponent<PlayerMovement> ();

			gunColor = gunBarrellEnd.GetComponent<Light> ();
			startLightColor = gunColor.color;

			lineRendererMaterial = gunBarrellEnd.GetComponent<LineRenderer> ();
			startLineRendererMaterial = lineRendererMaterial.material;

			particleSystem = gunBarrellEnd.GetComponent<ParticleSystem> ();
			particleSystemStartColor = particleSystem.startColor;
		}
    // Use this for initialization
    void Start()
    {
        shootingScript = GetComponentInChildren <CompleteProject.PlayerShooting>();
        playerHealth   = gameObject.GetComponent <CompleteProject.PlayerHealth>();

        /*if(shootingScript.vrGun != null)
         * {
         *  // Callback for Local layer, not server
         *  shootingScript.vrGun.OnDown += CmdShoot;
         * }*/
        if (VRTracker.instance != null)
        {
            vrGun = VRTracker.instance.getTag(VRTracker.TagType.Gun);
        }

        if (vrGun != null)
        {
            vrGun.OnDown += FireShot;
        }
    }
Ejemplo n.º 8
0
 // Use this for initialization
 void Start()
 {
     this.playerHealth   = this.GetComponentInChildren <CompleteProject.PlayerHealth>() as CompleteProject.PlayerHealth;
     this.playerMovement = this.GetComponentInChildren <CompleteProject.PlayerMovement>() as CompleteProject.PlayerMovement;
     this.playerShooting = this.GetComponentInChildren <CompleteProject.PlayerShooting>() as CompleteProject.PlayerShooting;
 }
Ejemplo n.º 9
0
 public ShootCommand(CompleteProject.PlayerShooting _playerShooting)
 {
     playerShooting = _playerShooting;
 }
Ejemplo n.º 10
0
 // Use this for initialization
 void Start()
 {
     this.playerHealth = this.GetComponentInChildren<CompleteProject.PlayerHealth>() as CompleteProject.PlayerHealth;
     this.playerMovement = this.GetComponentInChildren<CompleteProject.PlayerMovement>() as CompleteProject.PlayerMovement;
     this.playerShooting = this.GetComponentInChildren<CompleteProject.PlayerShooting>() as CompleteProject.PlayerShooting;
 }
Ejemplo n.º 11
0
 private void Awake()
 {
     playershooting = GetComponentInChildren <CompleteProject.PlayerShooting>();
     Debug.Log(this.playershooting);
 }