示例#1
0
    private void AddAilmentInfo(string detail, int turn)
    {
        UnitAilmentContext _newAilment = new UnitAilmentContext();

        _newAilment.setupAilmentInfo(detail, turn);
        Ailment_info_list.Add(_newAilment);
    }
示例#2
0
    private void AddAbilityInfo(string detail, int turn)
    {
        string wrk_string = detail;

        wrk_string = wrk_string.Replace("\r\n", "\n");
        wrk_string = wrk_string.Replace("\r", "\n");

        // 行数を計算
        int line_count  = 1;
        int start_index = 0;

        while (true)
        {
            int kaigyo_index = wrk_string.IndexOf("\n", start_index);
            if (kaigyo_index < 0)
            {
                break;
            }

            line_count++;
            start_index = kaigyo_index + 1;
        }

        {
            UnitAilmentContext _newAilment = new UnitAilmentContext();
            _newAilment.setupAbilityInfo(detail, turn);
            Ailment_info_list.Add(_newAilment);
        }

        // 表示行数分の空間を開ける
        for (int idx = 1; idx < line_count; idx++)
        {
            UnitAilmentContext _newAilment = new UnitAilmentContext();
            _newAilment.setupAbilityInfo("", -1);
            Ailment_info_list.Add(_newAilment);
        }
    }