예제 #1
0
    IEnumerator attackRoutine(GameCharacter[] from, int[] fromIndex, GameCharacter[] to, int[] toIndex, int actionIndex)
    {
        foreach (var fromItem in from)
        {
            foreach (var toItem in to)
            {
                StatusData data = toItem.CurrentStat;
                data.VIT          -= fromItem.CurrentStat.STR;
                toItem.CurrentStat = data;
            }
        }

        foreach (var item in fromIndex)
        {
            uiController.PortraitShake(item, true);
        }
        foreach (var item in toIndex)
        {
            uiController.showEffect(item, true);
        }

        yield return(new WaitForSeconds(0.5f));

        refreshData();


        foreach (var item in fromIndex)
        {
            uiController.PortraitShake(item, false);
        }
        foreach (var item in toIndex)
        {
            uiController.showEffect(item, false);
        }
        yield return(null);
    }