Inheritance: UnityEngine.MonoBehaviour
コード例 #1
0
        // Use this for initialization
        void Awake()
        {
            pwm = this;

            leftShot = leftBarrel.GetComponent<PlayerShooting> ();
            rightShot = rightBarrel.GetComponent<PlayerShooting> ();
            centerShot = centerBarrel.GetComponent<PlayerShooting> ();
        }
コード例 #2
0
        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;
        }
コード例 #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;
        }
コード例 #4
0
        // 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();
        }
コード例 #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;
		}
コード例 #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;
		}
コード例 #7
0
    // 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;
        }
    }
コード例 #8
0
ファイル: Player.cs プロジェクト: JELGT2011/CS-4455
 // 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;
 }
コード例 #9
0
 public ShootCommand(CompleteProject.PlayerShooting _playerShooting)
 {
     playerShooting = _playerShooting;
 }
コード例 #10
0
ファイル: Player.cs プロジェクト: JELGT2011/CS-4455
 // 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;
 }
コード例 #11
0
ファイル: GestureCatcher.cs プロジェクト: marcomnt/RV
 private void Awake()
 {
     playershooting = GetComponentInChildren <CompleteProject.PlayerShooting>();
     Debug.Log(this.playershooting);
 }