Ejemplo n.º 1
0
	/*	public Unit( byte type )
		{
			this.type = type;
		}	*/

		public Unit( 
			byte type, string name, string description, byte attack, byte defense, 
			byte move, enums.speciality speciality, byte terrain, byte transport, 
			int cost, byte disponibility, byte obselete, byte sight, byte range, 
			bool entrenchable, bool highSeaSync, bool stealth, byte neededResource
			)
		{
			this.type = type;
			this.name = name;
			this.description = description;
			this.attack = attack;
			this.defense = defense;
			this.move = move;

			this.speciality = speciality;
			this.terrain = terrain;
			this.transport = transport;

			this.cost = cost; 

			this.disponibility = disponibility; // tech
			this.obselete = obselete; // unit

			this.sight = sight;
			this.range = range;

			this.entrenchable = entrenchable;
			this.highSeaSync = highSeaSync;
			this.stealth = stealth;
			this.neededResource = neededResource;

	//		this.neededTechno = Statistics.technologies[ disponibility ];
			
			try
			{
				this.bmp = new Bitmap( Form1.appPath + "\\images\\units\\" + name + ".png");
			}
			catch ( Exception e )
			{
				throw ( new Exception( "Error loading: " + name + ".png\n\n" + e.Message ) );
			}
		}
Ejemplo n.º 2
0
        /*	public Unit( byte type )
         *      {
         *              this.type = type;
         *      }	*/

        public Unit(
            byte type, string name, string description, byte attack, byte defense,
            byte move, enums.speciality speciality, byte terrain, byte transport,
            int cost, byte disponibility, byte obselete, byte sight, byte range,
            bool entrenchable, bool highSeaSync, bool stealth, byte neededResource
            )
        {
            this.type        = type;
            this.name        = name;
            this.description = description;
            this.attack      = attack;
            this.defense     = defense;
            this.move        = move;

            this.speciality = speciality;
            this.terrain    = terrain;
            this.transport  = transport;

            this.cost = cost;

            this.disponibility = disponibility;   // tech
            this.obselete      = obselete;        // unit

            this.sight = sight;
            this.range = range;

            this.entrenchable   = entrenchable;
            this.highSeaSync    = highSeaSync;
            this.stealth        = stealth;
            this.neededResource = neededResource;

            //		this.neededTechno = Statistics.technologies[ disponibility ];

            try
            {
                this.bmp = new Bitmap(Form1.appPath + "\\images\\units\\" + name + ".png");
            }
            catch (Exception e)
            {
                throw (new Exception("Error loading: " + name + ".png\n\n" + e.Message));
            }
        }