public void NotifyAttrChgDelay(string playerid, short type, short num, short delay) { delayAttr da = new delayAttr(); da._id = playerid; da.type = type; da.num = num; da.delay = delay; _delayList.Add(da); }
void DelayAttrAction(short t) { delayAttr da = null; for (int i = 0; i < _delayList.Count; ++i) { da = _delayList[i]; _delayList[i].delay -= t; if (_delayList[i].delay <= 0) { NotifyAttrChg(da._id, da.type, da.num); } } _delayList.RemoveAll((o) => { return(o.delay <= 0); }); }