//public Game1.Actions Actions; public Unit(Player owner, Game1.ObjectType type, Tile tile) { this.ID = Identifier.ID; Identifier.ID++; this.Owner = owner; this.Type = type; this.Tile = tile; this.Tile.Entities.Add(this); this.Texture = ("textures//" + Type.ToString() + Owner.ID.ToString()); if (this.Type == Game1.ObjectType.Soldier) { this.AtkDef = 1; this.AttackRange = 1; this.MovementRange = 1; this.Price = 150; this.Discount = 30; if (this.Owner.ClimateCard.ID == Tile.ClimateID && Owner.ID == 0) { this.Price = this.Price - Discount; } } else if (this.Type == Game1.ObjectType.Robot) { this.AtkDef = 2; this.AttackRange = 1; this.MovementRange = 1; this.Price = 300; this.Discount = 60; if (this.Owner.ClimateCard.ID == Tile.ClimateID && Owner.ID == 1) { this.Price = this.Price - Discount; } } else if (this.Type == Game1.ObjectType.Tank) { this.AtkDef = 3; this.AttackRange = 2; this.MovementRange = 1; this.Price = 750; this.Discount = 150; if (this.Owner.ClimateCard.ID == Tile.ClimateID && Owner.ID == 2) { this.Price = this.Price - Discount; } } else if (this.Type == Game1.ObjectType.Boat) { this.AtkDef = 6; this.AttackRange = 0; this.MovementRange = 2; this.Price = 1000; this.Discount = 200; if (this.Owner.ClimateCard.ID == Tile.ClimateID && Owner.ID == 3) { this.Price = this.Price - Discount; } } }
public Barrack(Player owner, Game1.ObjectType type, Tile tile) { this.ID = Identifier.ID; Identifier.ID++; this.Owner = owner; this.Type = type; this.Tile = tile; this.Tile.Entities.Add(this); this.Tile.Traversable = false; this.Texture = ("textures//" + Type.ToString() + Owner.ID.ToString()); this.AtkDef = (this.Type == Game1.ObjectType.Barrack) ? 6 : 25; }