Пример #1
0
    IEnumerator Dissolve(GameObject obj)
    {
        float t = 0.0f;

        while (t <= 2.0f)
        {
            obj.GetComponent <MeshRenderer>().material.SetFloat("_DissolveThreshold", t / 2f);
            t += Time.deltaTime;
            yield return(null);
        }
        GameObject.Destroy(obj);
        fishManager.ResetFish();
    }
Пример #2
0
    void ResetGame()
    {
        //Revert to original state
        title.SetAlpha(0f);
        title.FadeTo(1f, 2f);

        fishManager.ResetFish();
        foodManager.ResetFood();
        enemyManager.ResetEnemies();

        score = 0;
        SetScore(score);
    }