diff api/Objects/Unit.cs @ 143:7f13ffcb8765 WarFoundry_v0.1beta2_Winforms

Re #164: Show unit cost in army tree * Do prep work and create "ICostedWarFoundryObject" interface that defines objects with a "Points" property * Implement new interface where necessary * Deprecate old variations on "points value" * Remove references to deprecated code
author IBBoard <dev@ibboard.co.uk>
date Sat, 19 Sep 2009 19:42:53 +0000
parents 57f7b80757ea
children c01366bd1627
line wrap: on
line diff
--- a/api/Objects/Unit.cs	Sat Sep 19 14:12:57 2009 +0000
+++ b/api/Objects/Unit.cs	Sat Sep 19 19:42:53 2009 +0000
@@ -13,7 +13,7 @@
 	/// <summary>
 	/// Summary description for UnitInstance.
 	/// </summary>
-	public class Unit : WarFoundryObject
+	public class Unit : WarFoundryObject, ICostedWarFoundryObject
 	{
 		private UnitType type;
 		private int size;
@@ -157,8 +157,14 @@
 			set { cat = value; }
 		}
 
+		[Obsolete("Use Points instead")]
 		public double PointsValue
 		{
+			get { return Points; }
+		}
+		
+		public double Points
+		{
 			get 
 			{
 				if (points == 0)