view api/Objects/Category.cs @ 8:613bc5eaac59

Re #9 - Make WarFoundry loading granular * Remove specific staged loading classes * Rework category loading for GameSystem and Race to make it use AddCategory(Category) method * Promote staged loading from Native Factory to all Factories level * Refactor XML Factory to use smaller methods Also removed some commented code that isn't used any more
author IBBoard <dev@ibboard.co.uk>
date Sun, 04 Jan 2009 19:24:13 +0000
parents 520818033bb6
children ac232763858b
line wrap: on
line source

using System;
using System.Xml;

namespace IBBoard.WarFoundry.API.Objects
{
	/// <summary>
	/// Summary description for Category.
	/// </summary>
	public class Category : WarFoundryObject
	{
		private int minPts, maxPts, minPc, maxPc, minChoice, maxChoice, baseVal, incVal, incAmount;
		/*private GameSystem system;*/
		
		public Category(string id, string name, int minPoints, int maxPoints, int minPercent, int maxPercent, int minChoices, int maxChoices, int baseValue, int incrementValue, int incrementAmount) : base(id, name)
		{
			minPts = minPoints;
			maxPts = maxPoints;
			minPc = minPercent;
			maxPc = maxPercent;
			baseVal = baseValue;
			incVal = incrementValue;
			incAmount = incrementAmount;
		}

		protected override string DefaultName()
		{
			return "";
		}

		public int MinimumPoints
		{
			get { return minPts; }
			set { minPts = value; }
		}

		public int MaximumPoints
		{
			get { return maxPts; }
			set { maxPts = value; }
		}
		
		public int MinimumPercentage
		{
			get { return minPc; }
			set { minPc = value; }
		}

		public int MaximumPercentage
		{
			get { return maxPc; }
			set { maxPc = value; }
		}

		public int MinimumChoices
		{
			get { return minChoice; }
			set { minChoice = value; }
		}

		public int MaximumChoices
		{
			get { return maxChoice; }
			set { maxChoice = value; }
		}

		public int BaseValue
		{
			get { return baseVal; }
			set { baseVal = value; }
		}

		public int IncrementValue
		{
			get { return incVal; }
			set { incVal = value; }
		}

		public int IncrementAmount
		{
			get { return incAmount; }
			set { incAmount = value; }
		}
	}
}