Ejemplo n.º 1
0
        /// <summary>Pick Up Logic. It can be called by the ANimator</summary>

        public void PickUpItem()
        {
            item.Picked();                               //Tell the Item that it was picked
            item.transform.parent           = Holder;    //Parent it to the Holder
            item.transform.localPosition    = PosOffset; //Offset the Position
            item.transform.localEulerAngles = RotOffset; //Offset the Rotation

            PickUpArea?.gameObject.SetActive(false);     //Disable the Pick Up Area

            FocusedItem?.OnFocused.Invoke(false);
            FocusedItem = null;                         //Remove the Focused Item

            animal?.UpdateAttackTriggers();

            OnPicking.Invoke(item.ID);                         //Invoke the Method
        }