コード例 #1
0
    //解析和执行ToDoList行动序列
    public void DealTDList()
    {
        if (TDL.Count == 0)
        {
            return;
        }
        if (!Main.Inst.isStageClear())
        {
            return;
        }
        TDL_Item item = TDL[0];

        Main.Inst.addDancer(item.type.ToString());
        switch (item.type)
        {
        case eTDL_Item_Type.TDL_Attack:
            StartCoroutine(corTDL_Attack(item));
            break;

        case eTDL_Item_Type.TDL_Move:
            StartCoroutine(corTDL_Move(item));
            break;

        case eTDL_Item_Type.TDL_Skill:
            StartCoroutine(corTDL_Skill(item));
            break;

        case eTDL_Item_Type.TDL_Strike:
            StartCoroutine(corTDL_Strike(item));
            break;

        default:
            break;
        }
    }
コード例 #2
0
    IEnumerator corTDL_Strike(TDL_Item item)
    {
        CheckStrike(0);
        yield return(new WaitUntil(BKTools.ISCWithArgu(item.type.ToString())));

        Main.Inst.redDancer(item.type.ToString());
        TDL.RemoveAt(0);
        yield return(null);
    }
コード例 #3
0
    /// <summary>
    /// TDL技能/攻击 协线程.
    /// TDL相关参数需要技能信息、方向限制
    /// </summary>
    IEnumerator corTDL_Skill(TDL_Item item)
    {
        if (item.argu_Direction != eDirection.None)
        {
            attack_Direction = item.argu_Direction;
        }
        SkillStart(item.argu_skill_info);
        //		Debug.Log ("技能开始" + Time.time);
        yield return(new WaitUntil(BKTools.ISCWithArgu(item.type.ToString())));

        //		Debug.Log ("技能结束" + Time.time);
        Main.Inst.redDancer(item.type.ToString());
        TDL.RemoveAt(0);
        yield return(null);
    }
コード例 #4
0
    /// <summary>
    /// TDL移动 协线程.
    /// TDL相关参数需要移动目的地ID
    /// </summary>
    /// <returns>The TD l move.</returns>
    /// <param name="item">Item.</param>
    IEnumerator corTDL_Move(TDL_Item item)
    {
        Main.Inst.now_turnphase.StartMoveChess(this);
        //		Debug.Log ("移动开始" + Time.time);
        yield return(new WaitForSeconds(GameRule.Moveing_Duration));

        Main.Inst.now_turnphase.moveChess(this, Main.Inst.chess_grids[item.argu_grid_id], item.argu_trigger_strike);
        //		Debug.Log ("移动" + Time.time);
        //万一有执行强袭就要等待
        yield return(new WaitUntil(BKTools.ISCWithArgu(item.type.ToString())));

        //		Debug.Log ("移动结束" + Time.time);
        Main.Inst.redDancer(item.type.ToString());
        TDL.RemoveAt(0);
        yield return(null);
    }