Beispiel #1
0
 public void HandleQueue(WsTaskManager tm, string queueName, Action complate)
 {
     this.m_tm        = tm;
     this.m_QueueName = queueName;
     this.m_Complate  = complate;
     StartCoroutine(Handle());
 }
Beispiel #2
0
    private void OnCollision()
    {
        //Destroy(gameObject);
        WsTaskManager tm = new TaskSystem.WsTaskManager();
        //打击效果
        Task hitTask = new Task("击中效果", new HitCondition(m_Skill, 1));

        tm.AddTask(hitTask);
        DamageCondtion dmgCond = new DamageCondtion(m_Skill,
                                                    delegate(int result)
        {
            HandleCast(m_Skill, result);
        },
                                                    EventsType.Skill_DamageEnd, m_Skill.Caster.m_Id);
        Task dmgTask = new Task("伤害检查", dmgCond);

        tm.AddTask(dmgTask);
        //启动任务队列
        tm.Start(">>>技能施法流程", delegate()
        {
            m_Skill.End();
        });
    }