private void AddToObjects(UNResourceObject resObj) { var list = UNList <UNResourceObject> .New(); list.Add(resObj); m_objs.Add(resObj.m_key, list); }
public override void Init() { base.Init(); if (m_scripts.IsNull()) { m_scripts = UNList <UNMonoBehaviorObject> .New(); } }
public override void Init() { base.Init(); Instance = this; m_wwws = UNList <UNWWW> .New(); InitAssetsBundle(); }
public void DispatchEvent(EventType type, object[] pars) { UNList <object[]> objs = null; if (!m_triggers.TryGetValue(type, out objs)) { objs = UNList <object[]> .New(); m_triggers.Add(type, objs); } objs.Add(pars); }
public void AddEventListener(EventType type, EventCallBack cb) { UNList <EventCallBack> cbs = null; if (!m_listeners.TryGetValue(type, out cbs)) { cbs = UNList <EventCallBack> .New(); m_listeners.Add(type, cbs); } cbs.Add(cb); }
public override void Init() { base.Init(); InitBehaviorsTrans(); if (m_behaviorsWaitForExecute.IsNull()) { m_behaviorsWaitForExecute = UNList <UNBehavior> .New(); } if (m_cbsBeforeBehaviorChange.IsNull()) { m_cbsBeforeBehaviorChange = UNList <UNBehaviorChangeStateCallBack> .New(); } if (m_cbsAfterBehaviorChange.IsNull()) { m_cbsAfterBehaviorChange = UNList <UNBehaviorChangeStateCallBack> .New(); } }
public void AddBehaviorsTransRule(UNBehaviorType fromType, UNBehaviorType toType) { UNList <UNBehaviorType> fromList = null; if (m_behaviorsTransRules.ContainsKey(toType)) { if (!m_behaviorsTransRules[toType].Contains(fromType)) { fromList = m_behaviorsTransRules[toType]; } } else { fromList = UNList <UNBehaviorType> .New(); } if (fromList != null) { fromList.Add(fromType); } AddBehaviorsTransRule(fromList, toType); }