Exemplo n.º 1
0
        public PlayerEntity()
        {
            _playerId = Guid.NewGuid();

            Inventory = new InventoryContainer(INVENTORY_SIZE);
            Toolbelt  = new InventoryContainer(TOOLBELT_SIZE);

            Speed = 0.1f;
            Size  = 0.8f;
        }
Exemplo n.º 2
0
 private void UpdateItems(InventoryContainer container)
 {
     for (int slotIndex = 0; slotIndex < container.Count; slotIndex++)
     {
         var itemStack = container.GetSlot(slotIndex);
         if ((itemStack != null) && (itemStack.StackSize == 0))
         {
             container.SetSlot(slotIndex, null);
         }
     }
 }