// найти список точек в заданном полигоне public static AnchorPointList CreateNear(Coordinates center, CoordinatesList border) { // отладка return(new AnchorPointList() { }); }
public bool ShotFired(Coordinates coordinates) { if (CoordinatesList.Any(x => x.XCoordinate == coordinates.XCoordinate && x.YCoordinate == coordinates.YCoordinate)) { return(true); } return(false); }
public WaterBlur(XmlNode node) { XmlNode groudblur = node.SelectSingleNode(".//GroundBlur"); if (groudblur != null) { this.groudblur = new GroundBlur(groudblur); } else { this.groudblur = null; } XmlNode coordinates_list = node.SelectSingleNode(".//CoordinatesList"); if (coordinates_list != null) { this.border = CoordinatesList.CreateCoordinatesList(coordinates_list); } else { this.border = null; } this.radius = Helper.GetFloatAttribute(node, "radius", 0.0f); this.toobporosity = Helper.GetFloatAttribute(node, "toobporosity", 0.0f); this.toobheight = Helper.GetFloatAttribute(node, "toobheight", 0.0f); XmlNode eco_objects_list = node.SelectSingleNode(".//EcoObjectsList"); if (eco_objects_list != null) { this.ecoobjectslist = EcoObjectsList.CreateEcoObjectsList(eco_objects_list); } else { this.ecoobjectslist = null; } XmlNode water_pollution_list = node.SelectSingleNode(".//WaterPollutionList"); if (water_pollution_list != null) { this.watepollutionlist = WaterPollutionList.CreateWaterPollutionList(water_pollution_list); } else { this.watepollutionlist = null; } }
public bool InitilizeShip() { Orientation = GetOrientation(); var coordinates = _coordinateReader.ReadShipCoordinates(Orientation, PlayerName); CoordinatesList.Add(coordinates); for (int i = 1; i < ShipLength; i++) { coordinates = GetNextCoordinates(coordinates); CoordinatesList.Add(coordinates); } return(true); }
public GroundBlur(XmlNode node) { { XmlNode x = node.SelectSingleNode(".//SpreadPoint"); if (x != null) { this.spreadpoint = new SpreadPoint(x); } else { this.spreadpoint = null; } } XmlNode coordinates_list = node.SelectSingleNode(".//CoordinatesList"); if (coordinates_list != null) { this.bordercoordinateslist = CoordinatesList.CreateCoordinatesList(coordinates_list); } else { this.bordercoordinateslist = null; } XmlNode spreading_coef = node.SelectSingleNode(".//SpreadingCoefficient"); if (spreading_coef != null) { this.spreadingcoefficient = new SpreadingCoefficient(spreading_coef); } else { this.spreadingcoefficient = null; } this.square = Helper.GetFloatAttribute(node, "square", 0.0f); this.radius = Helper.GetFloatAttribute(node, "radius", 0.0f); this.totalmass = Helper.GetFloatAttribute(node, "totalmass", 0.0f); this.limitadsorbedmass = Helper.GetFloatAttribute(node, "limitadsorbedmass", 0.0f); this.avgdeep = Helper.GetFloatAttribute(node, "avgdeep", 0.0f); this.petrochemicalheight = Helper.GetFloatAttribute(node, "petrochemicalheight", 0.0f); this.adsorbedmass = Helper.GetFloatAttribute(node, "adsorbedmass", 0.0f); this.restmass = Helper.GetFloatAttribute(node, "restmass", 0.0f); this.depth = Helper.GetFloatAttribute(node, "depth", 0.0f); this.concentrationinsoil = Helper.GetFloatAttribute(node, "concentrationinsoil", 0.0f); this.timeconcentrationinsoil = Helper.GetFloatAttribute(node, "timeconcentrationinsoil", 0.0f); this.speedvertical = Helper.GetFloatAttribute(node, "speedvertical", 0.0f); this.timewatercomletion = Helper.GetFloatAttribute(node, "timewatercomletion", 0.0f); this.dtimemaxwaterconc = Helper.GetFloatAttribute(node, "dtimemaxwaterconc", 0.0f); this.timemaxwaterconc = Helper.GetFloatAttribute(node, "timemaxwaterconc", 0.0f); this.maxconcentrationwater = Helper.GetFloatAttribute(node, "maxconcentrationwater", 0.0f); this.ozcorrection = Helper.GetFloatAttribute(node, "ozcorrection", 0.0f); this.ecoobjectsearchradius = Helper.GetFloatAttribute(node, "ecoobjectsearchradius", 0.0f); { XmlNode x = node.SelectSingleNode(".//AnchorPointList"); if (x != null) { this.anchorpointlist = AnchorPointList.CreateAnchorPointList(x); } else { this.anchorpointlist = null; } } { XmlNode x = node.SelectSingleNode(".//GroundPollutionList"); if (x != null) { this.groundpolutionlist = GroundPollutionList.Create(x); } else { this.groundpolutionlist = null; } } { XmlNode x = node.SelectSingleNode(".//WaterProperties"); if (x != null) { this.waterproperties = new WaterProperties(x); } else { this.waterproperties = null; } } { XmlNode x = node.SelectSingleNode(".//EcoObjectsList"); if (x != null) { this.ecoobjecstlist = EcoObjectsList.CreateEcoObjectsList(x); } else { this.ecoobjecstlist = null; } } }