public override void Update(float fPassTime) { NFIDataList keyList = null; foreach (KeyValuePair <string, NFIHeartBeat> kv in mhtHeartBeat) { NFIHeartBeat heartBeat = (NFIHeartBeat)kv.Value; if (heartBeat.Update(fPassTime)) { if (null == keyList) { keyList = new NFCDataList(); } keyList.AddString((string)kv.Key); } } if (null != keyList) { for (int i = 0; i < keyList.Count(); i++) { mhtHeartBeat.Remove(keyList.StringVal(i)); } } }
public override void Update(float fPassTime) { NFCDataList keyList = null; foreach (System.Collections.DictionaryEntry heartObject in mhtHeartBeat) { NFIHeartBeat heartBeat = (NFIHeartBeat)heartObject.Value; if (heartBeat.Update(fPassTime)) { if (null == keyList) { keyList = new NFCDataList(); } keyList.AddString((string)heartObject.Key); } } if (null != keyList) { for (int i = 0; i < keyList.Count(); i++) { mhtHeartBeat.Remove(keyList.StringVal(i)); } } }
public override bool AddHeartBeat(NFIDENTID self, string strHeartBeatName, NFIHeartBeat.HeartBeatEventHandler handler, float fTime, NFIDataList valueList) { NFIObject xGameObject = GetObject(self); if (null != xGameObject) { xGameObject.GetHeartBeatManager().AddHeartBeat(strHeartBeatName, fTime, handler, valueList); } return true; }
public override void AddHeartBeat(string strHeartBeatName, float fTime, NFIHeartBeat.HeartBeatEventHandler handler, NFIDataList valueList) { if (!mhtHeartBeat.ContainsKey(strHeartBeatName)) { NFIHeartBeat xHeartBeat = new NFCHeartBeat(mSelf, strHeartBeatName, fTime, valueList); mhtHeartBeat.Add(strHeartBeatName, xHeartBeat); xHeartBeat.RegisterCallback(handler); } }
public abstract void RegisterCallback(NFIHeartBeat.HeartBeatEventHandler handler);
public abstract void AddHeartBeat(string strHeartBeatName, float fTime, NFIHeartBeat.HeartBeatEventHandler handler, NFIDataList valueList);
public override void RegisterCallback(NFIHeartBeat.HeartBeatEventHandler handler) { doHandlerDel += handler; }
public abstract bool AddHeartBeat(NFIDENTID self, string strHeartBeatName, NFIHeartBeat.HeartBeatEventHandler handler, float fTime, NFIDataList valueList);