public bool getstarted(int index) { if (!able() || index >= list.Count) { return(false); } if (current == null) { current = list[index]; if (current != null) { currenttime = 0; endtime = current.time; } else { return(false); } } else { que.Enqueue(index); } return(true); }
void proc() { if (current != null) { if (currenttime >= endtime) { GameObject buf = current.createresult(transform.position.x, transform.position.y); if (buf != null) { Unit bufinfo = buf.GetComponent <Unit>(), myinfo = gameObject.GetComponent <Unit>(); bufinfo.team = myinfo.team; //추가 처리 //렐리 포인트 //bufinfo.reserveaction("movedestend", 1, null, new float[] { destx, desty }, null); } current = null; currenttime = 0; //que pop if (que.Count > 0) { int index = que.Dequeue(); if (index < list.Count) { current = list[index]; endtime = current.time; } } } else { currenttime++; } } }