public void Fire(GrapplingHookManager gun, float speed, float maxDistance)
 {
     this.gun         = gun;
     this.speed       = speed;
     this.maxDistance = maxDistance;
     isFired          = true;
 }
 protected virtual void Start()
 {
     animator             = GetComponent <Animator>();
     netEquipable         = GetComponent <NetEquipable>();
     photonView           = GetComponent <PhotonView>();
     weaponManager        = GetComponent <WeaponManager>();
     shootPoint           = weaponManager.shootPoint;
     projectileManager    = GetComponent <ProjectileManager>();
     grapplingHookManager = GetComponent <GrapplingHookManager>();
     netEquipable.onGrabbed.AddListener(EnableShooting);
     netEquipable.onReleased.AddListener(DisableShooting);
 }
Esempio n. 3
0
    void Start()
    {
        indicatorMaterial    = bonusIndicator.GetComponent <Renderer>().material;
        projectileManager    = GetComponent <ProjectileManager>();
        grapplingHookManager = GetComponent <GrapplingHookManager>();
        audioSource          = GetComponent <AudioSource>();
        photonView           = GetComponent <PhotonView>();
        animator             = GetComponent <Animator>();

        GameManager.instance.onGameOver.AddListener(ResetWeapon);

        photonView.RPC("NetSetRegularProjectile", RpcTarget.All);
    }
 public void LoadOntoWeapon(GrapplingHookManager hookManager, Transform parent)
 {
     this.hookManager = hookManager;
     loadedOnWeapon   = true;
     LockToPoint(parent);
 }