public void AddBar(StatusBar bar) { lock (barCaches) { CollectionUtils.Add(barCaches, bar); } }
public StatusBar AddBar(int value_ren, int maxValue, int x, int y, int w, int h) { lock (barCaches) { StatusBar bar = new StatusBar(value_ren, maxValue, x, y, w, h); CollectionUtils.Add(barCaches,bar); return bar; } }
public bool RemoveBar(StatusBar bar) { if (bar == null) { return false; } lock (barCaches) { return CollectionUtils.Remove(barCaches,bar); } }
public void Show(StatusBar bar) { if (bar != null) { bar.SetVisible(true); } }
public void Hide(StatusBar bar) { if (bar != null) { bar.SetVisible(false); } }
public Enemy(string fileName, int sx, int sy, int ex, int ey, int speed, int hp) { this.SetDelay(300); this.SetImage(fileName); this.hpBar = new StatusBar(hp, hp, (this.GetWidth() - 25) / 2, this.GetHeight() + 5, 25, 5); this.startX = sx; this.startY = sy; this.endX = ex; this.endY = ey; this.speed = speed; this.hp = hp; }