예제 #1
0
 void CoalTextAction()
 {
     for (int i = 0; i < 10; i++)
     {
         string temp = "succses:" + i.ToString();
         dip.AddTextAction(i.ToString(), () => Debug.Log(temp));
     }
     CoalText();
 }
예제 #2
0
    void AttackAction(bool isCure, bool isDefeat, BattleChar target, int damage)
    {
        var log = "";

        if (isCure)
        {
            log += $"{target._displayName}は{damage}回復<{target._displayName}0>\n";
        }
        else
        {
            log += $"{target._displayName}は{damage}のダメージ<{target._displayName}0>を受けた\n";
        }
        if (isDefeat)
        {
            log += $"{target._displayName}は倒れた<{target._displayName}1>\n";
        }
        AddDisplayText(log);
        //表示の更新
        var targetDisp = _charParamDisplyer.GetParamDisplayer(target);

        if (targetDisp == null)
        {
            return;
        }
        _battleTextDisplayer.AddTextAction(target._displayName + "0", () => {
            targetDisp.SyncDisply();
            if (!isCure)
            {
                targetDisp.DamageAction();
            }
        });
        _battleTextDisplayer.AddTextAction(target._displayName + "1", () =>
        {
            targetDisp.DeadAction();
        });
    }