示例#1
0
文件: UI.cs 项目: glorykim1216/Square
    IEnumerator Alpha()
    {
        end = false;
        yield return(new WaitForSeconds(0.5f));


        bestScore = PlayerPrefs.GetFloat("bestScore", bestScore);
        if (time > bestScore)
        {
            bestScore = time;
        }

        bestScore_Text.text = "BEST SCORE : " + Mathf.Floor(bestScore * 100) / 100; // 소수 2번째 자리까지

        PlayerPrefs.SetFloat("bestScore", bestScore);
        PlayerPrefs.Save();

        GameOverObj.SetActive(true);

        gameOverBG.color = alpha;
        while (gameOverBG.color.a < 0.86f)
        {
            gameOverBG.color += alpha;
            yield return(0);
        }
    }
示例#2
0
文件: UI.cs 项目: glorykim1216/Square
 void OnAdsShowResultCallBack(ShowResult result)
 {
     // ReGame
     squaresTransform.rotation = Quaternion.Euler(0, 0, 0);
     GM.GetComponent <GameManager>().ReGame();
     GameOverObj.SetActive(false);
     GameManager.speed   *= 0.8f;
     GameManager.gameOver = false;
     end = true;
 }
示例#3
0
    private void Pet_Died(Pet source)
    {
        Destroy(this);
        Pet_HealthChanged(source, 0);
        PetMovement.enabled = false;
        Animator.enabled    = false;
        SpriteObj.SetActive(false);
        foreach (Button btn in PetButtons)
        {
            btn.interactable = false;
        }

        ExplodeParticleSystem.Play();

        GameOverObj.SetActive(true);
    }