예제 #1
0
파일: Cut.cs 프로젝트: vertoker/graphcut
    public IEnumerator RemovingActivity()//Спаун монет в зависимости от активности игрока
    {
        yield return(new WaitForSecondsRealtime(0.25f));

        if (isActiveActivity == true)
        {
            float c = count * 0.005f;
            if (c > 0.98f)
            {
                c = 0.98f;
            }
            float c2 = count * 0.01f;
            if (c2 > 1f)
            {
                c2 = 1f;
            }
            activity = activity * c2 - (0.99f - c);
            if (activity < 0f)
            {
                activity = 0f;
            }
        }
        lines.AddActivity(activity);
        StartCoroutine(RemovingActivity());
    }