Exemplo n.º 1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Exemplo n.º 2
0
 private void OnDestroy()
 {
     if (instance == this)
     {
         instance = null;
     }
 }
Exemplo n.º 3
0
 //가송 구현 사항 - End
 //연호 구현 사항 - Start
 public void Game_Init()                       //게임 시작시 초기화
 {
     this.BackGround.Controls.Clear();         //게임 보드 내부 블록 초기화(다시 시작할 때 대비)
     this.Next_Block.Controls.Clear();         //Next block 내부 블록 초기화(다시 시작할 때 대비)
     this.Nowfalling = new Block(r.Next(1, 8), r.Next(1, 8));
     foreach (Box b in this.Nowfalling.blocks) //게임보드에 블록 추가
     {
         this.BackGround.Controls.Add(b);
     }
     Thread.Sleep(500);
     this.Nextfalling = new Block(r.Next(1, 8), r.Next(1, 8));
     this.Nextfalling.Location_Next();
     foreach (Box b in this.Nextfalling.blocks) //Next Block에 해당 블록 표시
     {
         this.Next_Block.Controls.Add(b);
     }
     this.Now_Playing         = true;
     this.score               = 0;
     this.Score_text.Text     = "0";
     this.combo               = 0;
     this.remain_minutes      = 3;
     this.remain_seconds      = 60;
     this.Remain_Minutes.Text = "03";
     this.Remain_Seconds.Text = "00";
     this.g = new Game_Board();
     this.timer1.Start();
     this.timer2.Start();
 }