public override void Enable(PlayerShooting ps) { base.Enable(ps); flameArray = new GameObject[maxFlames]; if (isServer) { for (int i = 0; i < maxFlames; i++) { var flame = Instantiate(flamePrefab, Util.Vector.hiddenSpawn, Quaternion.identity) as GameObject; flame.GetComponent<FlameProjectile>().enabled = false; flameArray[i] = flame; NetworkServer.Spawn(flame); } } }
public PiercingPerk(GameObject player) { shooting = player.GetComponentInChildren<PlayerShooting>(); }
public ReloadSpeedPerk(GameObject player) { shooting = player.GetComponentInChildren<PlayerShooting>(); }
public virtual void Enable(PlayerShooting ps) { playerShooting = ps; currentAmmo = maxAmmo; enabled = true; }
void Awake() { anim = GetComponent<Animator>(); playerAudio = GetComponent<AudioSource>(); playerMovement = GetComponent<PlayerMovement>(); playerShooting = GetComponent<PlayerShooting>(); ResetHealth(); }
private void Start() { _body = GetComponent <Rigidbody2D>(); _camera = Camera.main; _playerShooting = GetComponent <PlayerShooting>(); }