Exemplo n.º 1
0
        public Weapon(EnumItemTypes itemType, int damage = 0, int range = 0) : base(itemType)
        {
            Damage = damage;
            Range  = range;

            AssignWeaponTypeValues();
        }
Exemplo n.º 2
0
 public Item(int weight, int value, string description, EnumItemTypes name)
 {
     //renderableObject = gameObject;
     this.description = description;
     this.value       = value;
     this.weight      = weight;
     type             = name;
 }
Exemplo n.º 3
0
    public string GetItem(EnumItemTypes _type)
    {
        if (inventory.Count < 1)
        {
            UpdateInventoryDictionary();
        }

        if (inventory.ContainsKey(_type))
        {
            return(inventory[_type]);
        }
        else
        {
            return("");
        }
    }
Exemplo n.º 4
0
        private EnumSfmlSprites GetItemSpriteEnum(EnumItemTypes item)
        {
            switch (item)
            {
            case EnumItemTypes.GateKey:
                return(EnumSfmlSprites.ItemKey);

            case EnumItemTypes.Knife:
                return(EnumSfmlSprites.ItemKnife);

            case EnumItemTypes.Pistol:
                return(EnumSfmlSprites.ItemPistol);

            case EnumItemTypes.SniperRifle:
                return(EnumSfmlSprites.ItemPistol);

            default:
                return(EnumSfmlSprites.ItemKnife);
            }
        }
Exemplo n.º 5
0
 public Breastplate(int weight, int value, string description, EnumItemTypes name, GameObject it) : base(weight, value, description, name)
 {
     //renderableObject = Instantiate()
     //  renderableObject = it;
 }
Exemplo n.º 6
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="Item">This is one of many types of Enums (ClothingItems, EquipableItem, TrinketItem, ConsumableItem, ContainerItem) </param>
    /// <param name="resourceType"></param>
    /// <param name="ItemType"></param>
    /// <returns></returns>
    public GameObject CreateCraftableItem(object Item, EnumResourceType resourceType, EnumItemTypes ItemType)
    {
        print("Creating Game Object ");
        GameObject item = null;

        switch (ItemType)
        {
        case EnumItemTypes.ClothingItem:
            item = CreateCraftableItem(Item, resourceType, ClothingPrefabDict);
            break;

        case EnumItemTypes.EquipableItem:
            item = CreateCraftableItem(Item, resourceType, EquipablePrefabDict);
            break;

        default:
            break;
        }
        return(item);
    }
Exemplo n.º 7
0
 //enum clothing type
 public ClothingItem(int weight, int value, string description, EnumItemTypes name) : base(weight, value, description, name)
 {
 }
Exemplo n.º 8
0
 //enum resource type
 public ResourceItem(int weight, int value, string description, EnumItemTypes name) : base(weight, value, description, name)
 {
 }
Exemplo n.º 9
0
 public Item(EnumItemTypes itemType)
 {
     ItemType = itemType;
 }