예제 #1
0
파일: GameUI.cs 프로젝트: eponymoose/Sirtet
    public void UpdateUI()
    {
        if (_game != null)
        {
            score.text = _game.GetScore().ToString();
            level.text = _game.GetLevel().ToString();
            rows.text  = _game.GetRowsCleared().ToString();

            foreach (ShapeDisplay shapeCounter in shapeCounterDisplays)
            {
                shapeCounter.UpdateDisplay(_game.GetTileSet());
            }

            for (int shapeIndex = 0; shapeIndex < shapeCounterText.Length; ++shapeIndex)
            {
                shapeCounterText[shapeIndex].text = _game.GetRandomizer().GetShapeCount(shapeIndex).ToString();
            }

            nextShape.Shape = _game.GetRandomizer().PeekNextShape();
            nextShape.UpdateDisplay(_game.GetTileSet());
        }
    }
예제 #2
0
 //--------------------------------------------------------------------------
 // Post your score
 public void StartPostScore()
 {
     mHighScoreBoard.StartPostScore(mTetrisGame.GetPlayerName(), mTetrisGame.GetLevel(), mTetrisGame.GetScore());
 }