Exemple #1
0
 public void Hit()
 {
     if (canRestart)
     {
         GuiHandler.ShowRestart();
         canRestart = false;
     }
     else
     {
         canRestart = true;
         GuiHandler.RestartLevel();
     }
 }
    private void Update()
    {
        var t = (System.DateTime.Now - _call);

        _txt.text = "" + (7f - Mathf.Floor((float)t.TotalSeconds));

        Img.fillAmount = (7f - (float)t.TotalSeconds) / 7f;
        Img.color      = new Color(Img.color.r, Img.color.g, Img.color.b, Img.fillAmount);
        if (t.TotalSeconds > 7.3f)
        {
            GuiHandler.RestartLevel();
        }
    }