コード例 #1
0
 public void PressPowerButton()
 {
     if (grid != null)
     {
         if (grid.State != UnityGrid.GridStates.Unsolved)
         {
             grid.Reset();
         }
         else
         {
             grid.RunEvaluation();
         }
     }
 }
コード例 #2
0
    // Update is called once per frame
    void Update()
    {
        if (grid != null)
        {
            if (grid.State == UnityGrid.GridStates.Unsolved)
            {
                currentTime       -= 1 * Time.deltaTime;
                CountdownText.text = currentTime.ToString("00.00");

                if (currentTime <= 0)
                {
                    currentTime = 0;
                    grid.RunEvaluation();
                }
            }
            else
            {
                CountdownText.text = "----";
            }
        }
    }