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

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