/// <summary> /// 1.放技能 /// </summary> /// <param name="skill"></param> public void Fire(Skill skill) { //to-do吟唱 吟唱时间可以根据表格来 TimeCondition singCond = new TimeCondition(skill.Attribute.m_DelayTime);// Task singTask = new Task("吟唱任务", singCond); m_tm.AddTask(singTask); Task emitTask = new Task("释放", new CastCondition(skill, 0.1f)); m_tm.AddTask(emitTask); //启动任务队列 m_tm.Start("吟唱任务"); }
public void Fire02(Skill skill) { string que01 = "蓄力队列>01"; TimeCondition singCond = new TimeCondition(skill.Attribute.m_DelayTime); TaskSystem.Task singTask = new TaskSystem.Task(" 蓄力任务", singCond); m_tm.AddTask(singTask); m_tm.Start(que01, delegate() { Debug.Log(que01 + "队列结束********************************************"); for (int i = 0; i < skill.Attribute.m_BuffList.Count; i++) { WsTaskManager wtm = new WsTaskManager(); Buff b = skill.Attribute.m_BuffList[i]; TimeCondition singCond3 = new TimeCondition(b.m_DelayTime); TaskSystem.Task singTask3 = new TaskSystem.Task("A buff延迟任务" + (i + 1), singCond3); wtm.AddTask(singTask3); wtm.Start(" buff延迟队列>" + (i + 1), delegate() { //Debug.Log(" buff延迟队列结束>" + (i + 1)); Debug.Log("buff延迟任务队列结束********************************************"); WsTaskManager wtm2 = new WsTaskManager(); string tn = "B buff生效任务:" + b.m_BuffName; BuffCondition bc = new BuffCondition(b, b.m_BuffTime); //Debug.Log(tn); TaskSystem.Task tbc = new TaskSystem.Task(tn, bc); wtm2.AddTask(tbc); wtm2.Start("000 buff队列>" + (i + 1), delegate() { Debug.Log("buff队列队列结束********************************************"); b.RemoveBuff(); }); }); } }); }
public override void Fire2(Skill skill) { //释放特效 //CastCondition cc = new CastCondition(skill,skill.Attribute.m_DelayTime); //Task.Task emitTask = new Task.Task("释放", cc); //tm.AddTask(emitTask); //TimeCondition singCond = new TimeCondition(skill.Attribute.m_DelayTime); //Task.Task singTask = new Task.Task("吟唱任务", singCond); //tm.AddTask(singTask); //WsTaskManager tm1 = new WsTaskManager(); //Buff b = skill.Attribute.m_BuffList[0]; //BuffCondition bc = new BuffCondition(b, b.m_BuffTime); //string tn = b.m_BuffName; ////Debug.Log(tn); //Task.Task tbc = new Task.Task(tn, bc); //tm1.AddTask(tbc); //tm1.Start(tn, delegate () //{ // b.RemoveBuff(); //}); //Buff b2 = skill.Attribute.m_BuffList[1]; //BuffCondition bc2 = new BuffCondition(b2, b2.m_BuffTime); //string tn2 = b2.m_BuffName; //Debug.Log(tn2); //Task.Task tbc2 = new Task.Task(tn2, bc); //tm.AddTask(tbc2); //tm.Start(tn2, delegate () //{ // b2.RemoveBuff(); //}); for (int i = 0; i < skill.Attribute.m_BuffList.Count; i++) { Buff b = skill.Attribute.m_BuffList[i]; b.InitBuff(skill.Caster); WsTaskManager wtm2 = new WsTaskManager(); string tn = "B buff生效任务:" + b.m_BuffName; BuffCondition bc = new BuffCondition(b, b.m_BuffTime); TaskSystem.Task tbc = new TaskSystem.Task(tn, bc); wtm2.AddTask(tbc); wtm2.Start("000 buff队列>" + (i + 1), delegate() { b.RemoveBuff(); Debug.Log("3.*****************Fight:" + obj_entity.Fight); }); } //TimeCondition singCond2 = new TimeCondition(skill.Attribute.m_DelayTime); //Task.Task singTask2 = new Task.Task("吟唱任务2", singCond2); //tm.AddTask(singTask2); //tm.Start("队列02", delegate () //{ // Debug.Log("队列02结束------------------------------------------"); //}); //BuffCondition bc = new BuffCondition(skill.Attribute.m_BuffList[0],5); //Task.Task tbc = new Task.Task("bc任务", bc); //tm.AddTask(tbc); //tm.Start("bc任务" + attribute.Name, delegate () //{ // skill.Attribute.m_BuffList[0].RemoveBuff(); //}); ////启动任务队列 //tm.Start("吟唱任务" + attribute.Name, delegate () //{ // Debug.Log("Hp:---------" + obj_entity.Hp); // skill.End(); //}); }