Exemple #1
0
        public void Interacted(int?itemId)
        {
            if (!itemId.HasValue)
            {
                return;
            }

            var           player = PlayerFunctions.GetModelById(PlayerFunctions.GetIdOfControllable());
            MonoBehaviour script;

            SystemManagement.SystemManagement.Scripts.TryGetValue(player.GameObject, out script);

            var itemAttr = itemFunctions.GetItemAtributtes(itemId.Value);

            script.CallMethod("UseItem", itemAttr);
            //_p.UseItem(itemAttr);

            //player.UseItem(itemAttr);
            inventoryItemFunctions.DecreaseAmount(itemId);

            UpdateInventory();
        }
Exemple #2
0
        public override Vector3 PositionCenterAttack(Vector3 colSize, Transform transform)
        {
            var player = playerFunctions.GetModelById(id);

            return(transform.position + PositionAttack(colSize, player.LastMoviment.Value));
        }