public Bomb(Control F1btnBomb, BombImage F1ImageBomb) { this.btnBomb = F1btnBomb; this.ImageBomb = F1ImageBomb; this.ThoiGianBomb.Enabled = true; this.ThoiGian = DateTime.Now.AddSeconds(2); ThoiGianBomb.Elapsed += ThoiGianBomb_Elapsed; }
//デバッグ用 public void GeneratorBombImage(int ID) { switch (ID) { case 0: tmpPrefab = (BombImage)Instantiate(bombImageCircle); break; case 1: tmpPrefab = (BombImage)Instantiate(bombImageTriangle); break; case 2: tmpPrefab = (BombImage)Instantiate(bombImageSquare); break; default: break; } tmpPrefab.Initialize(GetMyColor()); tmpPrefab.transform.SetParent(canvas.transform, false); }
public void GenerateBombImage() { nowBombNum = Random.Range(0, 3); switch (nowBombNum) { case 0: tmpPrefab = (BombImage)Instantiate(bombImageCircle); break; case 1: tmpPrefab = (BombImage)Instantiate(bombImageTriangle); break; case 2: tmpPrefab = (BombImage)Instantiate(bombImageSquare); break; default: break; } tmpPrefab.Initialize(GetMyColor()); tmpPrefab.transform.SetParent(canvas.transform, false); }