Пример #1
0
    IEnumerator ExecuteEnemyAction(CardAction action)
    {
        var targetData = action.Data.targetData;
        var selfData   = action.Data.selfData;

        if (selfData != null)
        {
            yield return(SelfAnimation(enemyLane, selfData, action));
        }

        if (targetData == null)
        {
            yield break;
        }

        if (targetData.damage > 0)
        {
            yield return(TargetAnimation(playerPos, playerLane, targetData, action));
        }
        else
        {
            playerLane.ExecuteAction(targetData);
        }
    }
Пример #2
0
    private IEnumerator ExecuteWithCoroutine(CharacterLane lane, CardData data, float time)
    {
        yield return(new WaitForSeconds(time));

        lane.ExecuteAction(data);
    }