// 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; }
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(); }
void Awake () { anim = GetComponent <Animator> (); playerAudio = GetComponent <AudioSource> (); playerMovement = GetComponent <PlayerMovement> (); playerShooting = GetComponentInChildren <PlayerShooting> (); shieldBuff = GetComponent<ShieldBuff> (); updateSlider = healthSlider.GetComponent<UpdateSlider> (); currentHealth = startingHealth; }
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; } }
// 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; }
public ShootCommand(CompleteProject.PlayerShooting _playerShooting) { playerShooting = _playerShooting; }
// 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; }
private void Awake() { playershooting = GetComponentInChildren <CompleteProject.PlayerShooting>(); Debug.Log(this.playershooting); }