Instantly share code, notes, and snippets.

Embed
What would you like to do?
Lesson 10.1 - Creating collections of objects - PART A - New classes
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Engine
{
public class InventoryItem
{
public Item Details { get; set; }
public int Quantity { get; set; }
public InventoryItem(Item details, int quantity)
{
Details = details;
Quantity = quantity;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Engine
{
public class LootItem
{
public Item Details { get; set; }
public int DropPercentage { get; set; }
public bool IsDefaultItem { get; set; }
public LootItem(Item details, int dropPercentage, bool isDefaultItem)
{
Details = details;
DropPercentage = dropPercentage;
IsDefaultItem = isDefaultItem;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Engine
{
public class PlayerQuest
{
public Quest Details { get; set; }
public bool IsCompleted { get; set; }
public PlayerQuest(Quest details)
{
Details = details;
IsCompleted = false;
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Engine
{
public class QuestCompletionItem
{
public Item Details { get; set; }
public int Quantity { get; set; }
public QuestCompletionItem(Item details, int quantity)
{
Details = details;
Quantity = quantity;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment