示例#1
0
    private void AddToObjects(UNResourceObject resObj)
    {
        var list = UNList <UNResourceObject> .New();

        list.Add(resObj);
        m_objs.Add(resObj.m_key, list);
    }
示例#2
0
 public override void Init()
 {
     base.Init();
     if (m_scripts.IsNull())
     {
         m_scripts = UNList <UNMonoBehaviorObject> .New();
     }
 }
示例#3
0
    public override void Init()
    {
        base.Init();
        Instance = this;
        m_wwws   = UNList <UNWWW> .New();

        InitAssetsBundle();
    }
示例#4
0
    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);
    }
示例#5
0
    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);
    }
示例#6
0
 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();
     }
 }
示例#7
0
    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);
    }