public Map(int x, int y, asd.Color color) { _x = x; _y = y; _color = color; }
IEnumerator <int> AnimateTransition(bool isFadeIn) { if (isFadeIn) { Color = new asd.Color(255, 255, 255, 0); } yield return(0); while (isFadeIn ? Color.A < 245 : Color.A > 10) { var temp = Color; if (isFadeIn) { temp.A += 5; } else { temp.A -= 5; } Color = temp; yield return(0); } if (isFadeIn) { Color = new asd.Color(255, 255, 255); } else { Dispose(); } yield return(0); }
public void PaintDeffenceColor() { var color = new asd.Color(0, 0, 200); foreach (var m in _maps) { m.SetColor(color); } }
public void PaintAttackColor() { var color = new asd.Color(200, 0, 0); foreach (var m in _maps) { m.SetColor(color); } }
public City(string name, Point[] points, int population) { _name = name; _population = population; _isAlive = true; _maps = new List <Map>(); var r = Singleton.Random; _color = new asd.Color((byte)r.Next(0, 255), (byte)r.Next(0, 255), (byte)r.Next(0, 255)); var fieldMap = Singleton.FieldMap; foreach (var p in points) { Map m = new Map(p.x, p.y, _color); m.SetCity(this); _maps.Add(m); fieldMap.SetMap(m); } }
public void SetCity(City city) { _city = city; _color = city.GetColor(); }
public void SetColor(asd.Color color) { _geometryObj.Color = color; }