コード例 #1
0
 public void AddBar(StatusBar bar)
 {
     lock (barCaches)
     {
         CollectionUtils.Add(barCaches, bar);
     }
 }
コード例 #2
0
ファイル: StatusBars.cs プロジェクト: 207h2Flogintvg/LGame
		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;
					}
		}
コード例 #3
0
ファイル: StatusBars.cs プロジェクト: 207h2Flogintvg/LGame
		public bool RemoveBar(StatusBar bar) {
			if (bar == null) {
				return false;
			}
			 lock (barCaches) {
						return CollectionUtils.Remove(barCaches,bar);
					}
		}
コード例 #4
0
 public void Show(StatusBar bar)
 {
     if (bar != null)
     {
         bar.SetVisible(true);
     }
 }
コード例 #5
0
 public void Hide(StatusBar bar)
 {
     if (bar != null)
     {
         bar.SetVisible(false);
     }
 }
コード例 #6
0
ファイル: TDScreen.cs プロジェクト: keppelcao/LGame
 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;
 }