Ejemplo n.º 1
0
    void Simulate()
    {
        if (!areKeysUp)
        {
            if (Time.realtimeSinceStartup - timeOfPress >= timeToRepeatPress)
            {
                areKeysUp   = true;
                timeOfPress = Time.realtimeSinceStartup;
            }
        }
        else
        {
            timeOfPress = Time.realtimeSinceStartup;
        }

        if (board != null)
        {
            board.BoardUpdate(Time.realtimeSinceStartup);

            if (board.IsGameOver())
            {
                board = null;
                Repaint();
            }
        }
    }