Example #1
0
    // Use this for initialization
    void Start()
    {
        //图集ab
        preLoads.Add(E_PoolType.Atlas, new List <string>());
        preLoads[E_PoolType.Atlas].Add("assetbundle/atlas/commonatlas");
        preLoads[E_PoolType.Atlas].Add("assetbundle/atlas/facebookatlas");
        preLoads[E_PoolType.Atlas].Add("assetbundle/atlas/teamatlas");
        //ui prefab
        preLoads.Add(E_PoolType.UICache, new List <string>());
        preLoads[E_PoolType.UICache].Add("assetbundle/prefabs/ui/bottommidui");
        preLoads[E_PoolType.UICache].Add("assetbundle/prefabs/ui/BottomSkillUI");
        preLoads[E_PoolType.UICache].Add("assetbundle/prefabs/ui/FaceBookUI");
        preLoads[E_PoolType.UICache].Add("assetbundle/prefabs/ui/GuildUI");
        preLoads[E_PoolType.UICache].Add("assetbundle/prefabs/ui/JoyStickUI");
        preLoads[E_PoolType.UICache].Add("assetbundle/prefabs/ui/SkillUI");
        preLoads[E_PoolType.UICache].Add("assetbundle/prefabs/ui/TopLeftUI");
        preLoads[E_PoolType.UICache].Add("assetbundle/prefabs/ui/UICanvas");
        preLoads[E_PoolType.UICache].Add("assetbundle/prefabs/ui/UpDownAnimUI");
        //model prefab
        preLoads.Add(E_PoolType.Model, new List <string>());
        preLoads[E_PoolType.Model].Add("assetbundle/prefabs/model/role_ueman/model/role_ueman");
        preLoads[E_PoolType.Model].Add("assetbundle/prefabs/model/role_fistgirl/model/role_fistgirl");
        preLoads[E_PoolType.Model].Add("assetbundle/prefabs/model/role_superman/model/role_superman");
        preLoads[E_PoolType.Model].Add("assetbundle/prefabs/model/avatar001/model/avatar_001");


        ManifestMgr.Init();
        AtlasMgr.Instance.Init();
    }
Example #2
0
    void Start()
    {
        InputMgr.Instance.initialize();
        ManifestMgr.Init();
        AtlasMgr.Instance.Init();
#if UNITY_5 || UNITY_2017 || UNITY_2018
        Application.logMessageReceived += Log;
#else
        Application.RegisterLogCallback(Log);
#endif
        lua = new LuaState();
        lua.Start();
        LuaBinder.Bind(lua);
        lua.OpenLibs(LuaDLL.luaopen_pb);
        lua.OpenLibs(LuaDLL.luaopen_struct);
        lua.OpenLibs(LuaDLL.luaopen_lpeg);
#if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX
        luaState.OpenLibs(LuaDLL.luaopen_bit);
#endif
        DelegateFactory.Register();
        string dataPath = Application.dataPath;
        int    index    = dataPath.LastIndexOf("/");
        dataPath = dataPath.Substring(0, index);
        //lua.AddSearchPath(fullPath);
        lua.DoFile(Path.Combine(dataPath, "Client/Scripts/__init.lua"));
        LogicFrame.Instance.initialize(lua);
        GameSocket.Instance.run("192.168.1.108", "8007");
    }