Added MudEngine Project to the Solution. I will slowly be moving the MudDesigner.MudEngine classes out of the Mud Designer Solution and into it's own.
Currently the Mud Designer still contains the old MudEngine classes until migration has been completed.
This commit is contained in:
parent
7d3b6e471d
commit
dc311f5aa5
21 changed files with 1330 additions and 0 deletions
36
MudEngine/GameObjects/Bag.cs
Normal file
36
MudEngine/GameObjects/Bag.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
//Microsoft .NET Framework
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
//MUD Engine
|
||||
using MudEngine.GameObjects.Items;
|
||||
|
||||
namespace MudEngine.GameObjects
|
||||
{
|
||||
public class Bag : BaseObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or Sets the size of the bag.
|
||||
/// </summary>
|
||||
public int Size
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
private List<Items.BaseItem> Items { get; set; }
|
||||
|
||||
public void Add(BaseItem item)
|
||||
{
|
||||
if (Items.Count < Size)
|
||||
Items.Add(item);
|
||||
}
|
||||
|
||||
public int GetSlotsRemaining()
|
||||
{
|
||||
return Size - Items.Count;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue