Ejemplo n.º 1
0
    // Use this for initialization
    void Awake()
    {
        bowPickup = bowSpawnerWithPedistal.GetComponentInChildren <ItemPackageSpawner>();
        hand1     = hand1Object.GetComponent <Hand>();
        hand2     = hand2Object.GetComponent <Hand>();
        GameObject steamVRHead = GameObject.Find(STEAMVR_HEAD_NAME);

        playerGrabedBow = false;
        GameObject weaponCollider = Instantiate(weaponSwitchTriggerObject, steamVRHead.transform);

        weaponCollider.transform.SetParent(steamVRHead.transform);
    }
Ejemplo n.º 2
0
 private void OnDisable()
 {
     if (ForestVR.Enabled)
     {
         if (this._bowVr)
         {
             ItemPackageSpawner component = this._bowVr.GetComponent <ItemPackageSpawner>();
             if (component)
             {
                 component.removeAttachedObjects(LocalPlayer.vrPlayerControl.RightHand);
             }
         }
         LocalPlayer.vrPlayerControl.LeftHand.hoverSphereRadius = this._prevHoverRadius;
     }
     EventRegistry.Player.Unsubscribe(TfEvent.AddedItem, new EventRegistry.SubscriberCallback(this.OnItemAdded));
     LighterControler.HasLightableItem = false;
     this._nextReArm = float.MaxValue;
     this._ammoAnimated.SetActive(true);
     if (this._animator)
     {
         this._animator.SetBoolReflected("drawBowBool", false);
         if (base.gameObject.activeInHierarchy)
         {
             this._bowAnimator.SetBoolReflected("drawBool", false);
         }
         this.ShutDown(false);
         this.ShutDownFire();
     }
     if (this._activeFireArrowGO)
     {
         UnityEngine.Object.Destroy(this._activeFireArrowGO);
         LocalPlayer.Inventory.IsWeaponBurning        = false;
         LocalPlayer.ScriptSetup.targetInfo.arrowFire = false;
     }
     this._lightingArrow = false;
     if (Scene.HudGui)
     {
         Scene.HudGui.ToggleArrowBonusIcon.SetActive(false);
     }
     if (this.Equals(LocalPlayer.ActiveBurnableItem))
     {
         LocalPlayer.ActiveBurnableItem = null;
     }
 }
Ejemplo n.º 3
0
 private void Awake()
 {
     bowSpawner = GameObject.Find("Longbow").GetComponentInChildren <ItemPackageSpawner>();
 }