public Trap GetTrap() { if (this.ThisInventory.GetTrap() == null) { return(null); } return(ThisInventory.GetTrap()); }
public void PutHandOut() { if (ThisInventory.IsItemInHand()) { Animator ThisAnim = this.GetObject().GetComponent <Animator>(); Vector3 worldpos = new Vector3(0.75f, 0, 3); Vector2 mousePos = Input.mousePosition; worldpos.x = mousePos.x; worldpos.y = mousePos.y; Vector3 newVec = Camera.main.ScreenToWorldPoint(worldpos); ThisAnim.SetIKPosition(AvatarIKGoal.RightHand, newVec); ThisAnim.SetIKPositionWeight(AvatarIKGoal.RightHand, 0.42f); ThisAnim.SetIKRotation(AvatarIKGoal.RightHand, Quaternion.Euler(new Vector3(27.0f, -50.0f, -160.0f) + this.GetRotationEuler())); ThisAnim.SetIKRotationWeight(AvatarIKGoal.RightHand, 1); } }