Ejemplo n.º 1
0
 //---------------------------------------------------------------------
 public LuaMgr()
 {
     Context     = CasinosContext.Instance;
     MapLuaFiles = new Dictionary <string, byte[]>();
     LuaEnv      = new LuaEnv();
     LuaEnv.AddLoader(_luaLoaderCustom);
 }
Ejemplo n.º 2
0
        //---------------------------------------------------------------------
        void Awake()
        {
            Application.targetFrameRate = 60;
            QualitySettings.vSyncCount  = 0;

            CasinosContext = new CasinosContext();
        }
Ejemplo n.º 3
0
        //---------------------------------------------------------------------
        void Awake()
        {
            bool use_persistent = true;

#if UNITY_EDITOR
            CasinosEditorConfig casinos_editor_cfg = new CasinosEditorConfig();
            use_persistent = casinos_editor_cfg.CfgUserSettings.UseTmpDirRes;
#endif

            KingTexasCasinosListener listener = new KingTexasCasinosListener();

            var casinos_context = new CasinosContext(listener,
                                                     use_persistent,
                                                     "KingTexasListener",
                                                     "Resources.KingTexas/Ui/",
                                                     "Resources.KingTexasRaw/",
                                                     "Resources.KingTexas/",
                                                     "Texas");

            casinos_context.Launch();

            //casinos_context.RegLuaFilePath(
            //    "Launch/",
            //    "Launch",
            //    "PreViewMgr",
            //    "PreViewFactory",
            //    "PreViewBase",
            //    "PreViewLoading",
            //    "PreViewMsgBox");
        }
Ejemplo n.º 4
0
        //---------------------------------------------------------------------
        void Start()
        {
#if !UNITY_EDITOR
            //CasinosContext.Instance.AddLog("OpenInstall.RegisterWakeupHandler(_onWakeupFinish)");
            Debug.Log("RegisterWakeupHandler, GetInstall");
            var openinstall = GetComponent <io.openinstall.unity.OpenInstall>();
            openinstall.RegisterWakeupHandler(_onWakeupFinish);
            openinstall.GetInstall(60, _onGetInstallFinish);
            //openinstall.ReportRegister();
            //openinstall.ReportEffectPoint("aaa", 1);
#endif

            bool force_use_resouceslaunch = false;
            bool force_use_dataoss        = false;

#if UNITY_EDITOR
            EditorCfgUserSettingsCopy cfg_usersettings = null;
            string p  = Path.Combine(Environment.CurrentDirectory, "./Assets/SettingsUser/");
            var    di = new DirectoryInfo(p);
            string path_settingsuser = di.FullName;

            string full_filename = Path.Combine(path_settingsuser, StringDef.FileEditorUserSettings);
            if (File.Exists(full_filename))
            {
                using (StreamReader sr = File.OpenText(full_filename))
                {
                    string s = sr.ReadToEnd();
                    cfg_usersettings = JsonUtility.FromJson <EditorCfgUserSettingsCopy>(s);
                }
            }

            if (cfg_usersettings != null)
            {
                force_use_resouceslaunch = cfg_usersettings.ForceUseDirResourcesLaunch;
                force_use_dataoss        = cfg_usersettings.ForceUseDirDataOss;
            }

            //string info = string.Format("ForceUseDirResourcesLaunch={0}, ForceUseDirDataOss={1}",
            //    force_use_resouceslaunch, force_use_dataoss);
            //Debug.Log(info);
            //Debug.Log("PersistentDataPath=" + Application.persistentDataPath);
#endif

            Context = new CasinosContext(force_use_resouceslaunch, force_use_dataoss);
            Context.Launch();
        }
Ejemplo n.º 5
0
        //---------------------------------------------------------------------
        public LuaMgr()
        {
            Context     = CasinosContext.Instance;
            MapLuaFiles = new Dictionary <string, byte[]>();
            LuaEnv      = new LuaEnv();
            LuaEnv.AddLoader(_luaLoaderCustom);

            LoadLuaFromResources("Lua/Launch");
            DoString("Launch");

            var lua_launch = LuaEnv.Global.Get <LuaTable>("Launch");

            FuncLaunchClose = lua_launch.Get <DelegateLua1>("Close");
            FuncLaunchOnApplicationPause = lua_launch.Get <DelegateLua3>("OnApplicationPause");
            FuncLaunchOnApplicationFocus = lua_launch.Get <DelegateLua3>("OnApplicationFocus");
            var func_setup = lua_launch.Get <DelegateLua1>("Setup");

            func_setup(lua_launch);
        }
Ejemplo n.º 6
0
        //---------------------------------------------------------------------
        void Awake()
        {
            bool force_use_resouceslaunch = false;
            bool force_use_dataoss        = false;

#if UNITY_EDITOR
            EditorCfgUserSettingsCopy cfg_usersettings = null;
            string p  = Path.Combine(Environment.CurrentDirectory, "./Assets/SettingsUser/");
            var    di = new DirectoryInfo(p);
            string path_settingsuser = di.FullName;

            string full_filename = Path.Combine(path_settingsuser, StringDef.FileEditorUserSettings);
            if (File.Exists(full_filename))
            {
                using (StreamReader sr = File.OpenText(full_filename))
                {
                    string s = sr.ReadToEnd();
                    cfg_usersettings = JsonUtility.FromJson <EditorCfgUserSettingsCopy>(s);
                }
            }

            if (cfg_usersettings != null)
            {
                force_use_resouceslaunch = cfg_usersettings.ForceUseDirResourcesLaunch;
                force_use_dataoss        = cfg_usersettings.ForceUseDirDataOss;
            }

            string info = string.Format("ForceUseDirResourcesLaunch={0}, ForceUseDirDataOss={1}",
                                        force_use_resouceslaunch, force_use_dataoss);
            Debug.Log(info);
            Debug.Log("PersistentDataPath=" + Application.persistentDataPath);
#endif

            Context = new CasinosContext(force_use_resouceslaunch, force_use_dataoss);
            Context.Launch();
        }