// Creates a New RTSUnitInstance on the Given Team with the Given Data at the Given Position public RTSUnit(RTSTeam team, RTSUnitData data, Vector2 position) { // Identification UUID = UUIDGenerator.GetUUID(); Team = team; Squad = null; gridPos = position; // Set From Common Data Data = data; Health = Data.Health; // Default Information height = 0; ViewDirection = Vector2.UnitX; CollisionGeometry = Data.ICollidableShape.Clone() as ICollidable; MovementMultiplier = 1f; Resources = 0; }
// Constructor public RTSBuilding(RTSTeam team, RTSBuildingData data, Vector2 position) { // Identification UUID = UUIDGenerator.GetUUID(); Team = team; gridPos = position; viewedInfo = new BitArray(GameState.MAX_PLAYERS); viewedInfo.SetAll(false); Data = data; gridPos.X += (Data.GridSize.X - 1); gridPos.Y += (Data.GridSize.Y - 1); height = 0; Health = Data.Health; bAmount = Data.BuildAmount; CollisionGeometry = Data.ICollidableShape.Clone() as ICollidable; ViewDirection = Vector2.UnitX; CollisionGeometry.Center += GridPosition; bControllers = new List <ACBuildingButtonController>(); }