public override void OnInspectorGUI()
        {
            ICECreatureItem _target = DrawEntityHeader <ICECreatureItem>();

            DrawItemContent(_target);
            DrawFooter(_target);
        }
        public virtual void DrawItemContent(ICECreatureItem _target)
        {
            if (_target == null)
            {
                return;
            }

            CreatureObjectEditor.DrawImpactObject(_target, _target.Impact, m_HeaderType);
            CreatureObjectEditor.DrawInventoryObject(_target.gameObject, _target.Inventory, m_HeaderType);
        }
Exemplo n.º 3
0
        public void PickupItem()
        {
            if (Inventory.Enabled == false)
            {
                return;
            }

            Ray        _ray = Camera.main.ScreenPointToRay(Input.mousePosition);
            RaycastHit _hit;

            if (Physics.Raycast(_ray, out _hit))
            {
                ICECreatureItem _item = _hit.transform.GetComponent <ICECreatureItem>();
                if (_item != null)
                {
                    Inventory.Insert(_item.gameObject);
                }
            }
        }