//top private void Do_top_Q() { //peek是查看pop是弹出 while (todoL.Peek().Count == 0) { todoL.Pop(); if (todoL.Count == 0) { //Debug.Log("here"); return; } } var todo_q = todoL.Peek(); CardTxt todo_c = todo_q.Peek(); //if(todo_c.GetType()!=typeof(moveTxt)&& todo_c.GetType() != typeof(clockTxt)) // Debug.Log(todo_c); //run之后会加入新的触发 call也由change 发出 //如果返回false 下次运行到这里还是使用这个change_直到可以弹出 if (todo_c.run_and_Pop(step)) { h.output(new out_info(todo_c, step[todo_c], true)); todo_q.Dequeue(); } else { h.output(new out_info(todo_c, step[todo_c], false)); } the_geter = null;//关闭被动触发接收开始下一轮结算 //if(todoL.Count!=0) Debug.Log(todoL.Peek()); // if (todoL.Peek().Count != 0) Debug.Log(todoL.Peek().Peek()); }
public out_info(CardTxt which, step_target step, bool p) { D_info = different.doing; isdiffer = false; w = which; s = step; poped = p; }
public void CopyDo_cardTxt(CardTxt cardTxt, step_target data, bool isactive, Host h) { if (isactive) { skill.doCard(cardTxt, data, h); } else { skill.AddTriggered(cardTxt, data); } }
public void AddTriggered(CardTxt eL, step_target data) { if (!OnGoing) { Debug.Log("error unGoing triggered"); return; } //报错 //Debug.Log("gettrigged"); step.Add(eL, data); if (the_geter == null) { the_geter = new Queue <CardTxt>(); todoL.Push(the_geter); } the_geter.Enqueue(eL); }
//eve-全新玩家主动行为 public void doactiveCall(Host host, Call_ c) { h = host; if (!OnGoing) { OnGoing = true; } else { Debug.Log("ongoing_error"); return; } //需要报错// step = new Dictionary <CardTxt, step_target>(); CardTxt.docall(h, c); if (todoL.Count != 0) { doall(); } OnGoing = false; }
public void doCard(CardTxt c, step_target data, Host host) { h = host; if (!OnGoing) { OnGoing = true; } else { Debug.Log("ongoing_error"); return; } //需要报错// step = new Dictionary <CardTxt, step_target>(); //-----------------------------------------------------------| step.Add(c, data); Queue <CardTxt> q = new Queue <CardTxt>(); q.Enqueue(c); todoL.Push(q);//加入技能 //-----------------------------------------------------------| doall(); OnGoing = false; }