public void DrawUnit(HexTilePosition pos, UnitType type) { Vector3 mapPos = RenderHex.HexPositionToMapPosition(pos); render.PushWorldMatrix(Matrix.CreateTranslation(mapPos)); switch (type) { case UnitType.Unknown: DrawUnknown(); break; case UnitType.Infantry: DrawInfantry(); break; case UnitType.Armor: DrawArmor(); break; case UnitType.Artillery: DrawArtillery(); break; default: DrawInvalid(); break; } render.PopWorldMatrix(); }
public TerrainType this[HexTilePosition pos] { get { int i = pos.Y * Width + pos.X; if (i > terrain.Length) { return TerrainType.None; } return terrain[i]; } }
public Unit(UnitType type, HexTilePosition pos) { Type = type; Position = pos; }