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);
                }
            }
        }
Exemple #2
0
 public PiercingPerk(GameObject player) {
     shooting = player.GetComponentInChildren<PlayerShooting>();
 }
Exemple #3
0
 public ReloadSpeedPerk(GameObject player) {
     shooting = player.GetComponentInChildren<PlayerShooting>();
 }
Exemple #4
0
 public virtual void Enable(PlayerShooting ps)
 {
     playerShooting = ps;
     currentAmmo = maxAmmo;
     enabled = true;
 }
Exemple #5
0
        void Awake()
        {
            anim = GetComponent<Animator>();
            playerAudio = GetComponent<AudioSource>();
            playerMovement = GetComponent<PlayerMovement>();
            playerShooting = GetComponent<PlayerShooting>();

            ResetHealth();
        }
Exemple #6
0
 private void Start()
 {
     _body           = GetComponent <Rigidbody2D>();
     _camera         = Camera.main;
     _playerShooting = GetComponent <PlayerShooting>();
 }