// Use this for initialization void Start() { index = 0; quit = false; tPool = new MsgPool <inner>(worker); timer = new tTimer(new TimerCallback(counting), null, Timeout.Infinite, Timeout.Infinite); timer.Change(100, Timeout.Infinite); }
public void sendDelayedMsg(int state, int delay, CUnit receiver) { CMsg msg = new CMsg(); msg.state = state; msg.sender = this; msg.receiver = receiver; msg.deliveryTime = delay; MsgPool.addElement(msg); }