Esempio n. 1
0
    private void AddToObjects(UNResourceObject resObj)
    {
        var list = UNList <UNResourceObject> .New();

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

        InitAssetsBundle();
    }
Esempio n. 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);
    }
Esempio n. 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);
    }
Esempio n. 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();
     }
 }
Esempio n. 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);
    }