Beispiel #1
0
    IEnumerator BeingUnion()
    {
        float sumTime = unionTime + Friend.redBalls.Count * unionTimet0;

        EffectManager.AttachPower(player.transform, sumTime);
        //UnityEngine.Debug.LogFormat("等待解除合体,unionTime={0},Friend.redBalls.Count = {1},结果{2}", unionTime, Friend.redBalls.Count, unionTime + Friend.redBalls.Count * unionTimet0);
        // yield return new WaitForSeconds(unionTime + Friend.redBalls.Count * t0);


        for (float t = Time.time; Time.time - t < sumTime;)
        {
            //UnityEngine.Debug.LogFormat("合体中...此时sumTime={0},Time.time={1}, t = {2}",sumTime,Time.time,t);
            yield return(0);
        }
        // UnityEngine.Debug.Log("准备执行解除合体函数");


        DivideRedBalls(0);
    }