private void ReleaseUnusedObjects() { for (int i = 0; i < m_objs.Count; ++i) { var objs = m_objs.GetValue(i); for (int j = objs.Count - 1; j >= 0; --j) { if (objs[j].m_state == UNObjectStateType.Alive) { continue; } objs[j].Release(); objs[j] = null; objs.RemoveAt(j); } } }
public new void Update() { for (int i = 0; i < m_triggers.Count; ++i) { var type = m_triggers.GetKey(i); if (!m_listeners.ContainsKey(type)) { continue; } var pars = m_triggers.GetValue(i); for (int k = 0; k < pars.Count; ++k) { DispatchEventImmediate(type, pars[k]); } } m_triggers.Clear(); }
// update 新 行为 private void UpdateNewBehavior() { if (m_curBehavior.IsNull()) { return; } for (int i = 0; i < m_behaviorsTransRules.Count; ++i) { var k = m_behaviorsTransRules.GetKey(i); var v = m_behaviorsTransRules.GetValue(i); for (int j = 0; j < v.Count; ++j) { if (m_curBehavior.m_type != v[j]) { continue; } AddWaitBehavior(k); return; } } }