public async void OnStart(IXCore core)
 {
     if (core.Services.TryGet <IXILRTInternal>(out var ilrt))
     {
         await ilrt.InvokeEntryMethod();
     }
 }
Beispiel #2
0
 public void OnInit(IXCore core)
 {
     if (ScriptableSingleton <FileServerDataCache> .instance.Server_Switch)
     {
         if (!FileServerEditorManager.IsServerRunning)
         {
             FileServerEditorManager.StartServer();
         }
     }
 }
Beispiel #3
0
        public XRuntime()
        {
            mCore             = XCore.GetMainInstance();
            mAssemblyFilePath = Path.Combine(XCore.LocalStorage_TinaX, "xruntime", XRuntimeConst.AssemblyFileName);
            mSymbolFilePath   = Path.Combine(XCore.LocalStorage_TinaX, "runtime", XRuntimeConst.SymbolFileName);
            mAppDomain        = new ILAppDomain();
#if DEBUG && (UNITY_EDITOR || UNITY_ANDROID || UNITY_IPHONE)
            mAppDomain.UnityMainThreadID = System.Threading.Thread.CurrentThread.ManagedThreadId;
#endif
        }
Beispiel #4
0
 public void OnStart(IXCore core)
 {
     if (core.Services.TryGet <ITSInternal>(out var ts))
     {
         try
         {
             ts.RequireEntryFile();
         }
         catch (Exception e)
         {
             UnityEngine.Debug.LogException(e);
         }
     }
 }
Beispiel #5
0
        public XILRT(IAssetService assets)
        {
            m_Assets    = assets;
            m_AppDomain = new ILAppDomain();
            m_Core      = XCore.GetMainInstance();
            m_XServices = m_Core.Services;

#if DEBUG && (UNITY_EDITOR || UNITY_ANDROID || UNITY_IPHONE)
            m_AppDomain.UnityMainThreadID = System.Threading.Thread.CurrentThread.ManagedThreadId;
#endif
            LoadSymbol = XCore.GetMainInstance().DevelopMode;
#if UNITY_EDITOR
            LoadSymbol = true;
#endif
        }
 public static bool IsCmnHans(this IXCore core)
 {
     if (core.Services.TryGet <ILocalizationService>(out var locatization))
     {
         var langs = locatization.GetCurrentLanguages();
         if (langs == null)
         {
             return(false);
         }
         return(langs.Any(l => l == UnityEngine.SystemLanguage.Chinese || l == UnityEngine.SystemLanguage.ChineseSimplified));
     }
     else
     {
         return(Application.systemLanguage == SystemLanguage.Chinese || Application.systemLanguage == SystemLanguage.ChineseSimplified);
     }
 }
Beispiel #7
0
 public static IXCore UseGameStage(this IXCore core)
 {
     return(core.RegisterServiceProvider(new GameStageProvider()));
 }
 public void OnServiceRegister(IXCore core)
 {
     core.Services.BindBuiltInService <IAppDomain, IXILRuntime, XILRT>()
     .SetAlias <IXILRTInternal>();
 }
 public Task <XException> OnStart(IXCore core)
 {
     return(core.Services.Get <IXILRTInternal>().StartAsync());
 }
Beispiel #10
0
    public void OnInit(IXCore core)
    {
        var xil = core.Services.Get <IXILRuntime>();

        this.RegisterILRuntimes(xil);
    }
Beispiel #11
0
 public void OnServiceRegister(IXCore core)
 {
     core.Services.Singleton <IGameStage, GameStageCore>()
     .SetAlias <IGameStageInternal>();
 }
 public void OnStart(IXCore core)
 {
     //move to hotfix project.
 }
Beispiel #13
0
 public void OnServiceRegister(IXCore core)
 {
     core.Services.Singleton <ITypeScript, TypeScriptManager>()
     .SetAlias <Internal.ITSInternal>();
 }
Beispiel #14
0
 public static IXCore UseUIKit(this IXCore core)
 {
     core.RegisterServiceProvider(new UIKitProvider());
     return(core);
 }
Beispiel #15
0
 public static IXCore UseLuaRuntime(this IXCore core)
 {
     core.RegisterServiceProvider(new LuaProvider());
     return(core);
 }
Beispiel #16
0
 public void OnServiceRegister(IXCore core)
 {
     core.Services.Singleton <ILua, LuaManager>()
     .SetAlias <Internal.ILuaInternal>();
 }
Beispiel #17
0
 public Task <XException> OnStart(IXCore core)
 => core.GetService <Internal.ILuaInternal>().Start();
Beispiel #18
0
 public static IXCore UseI18N(this IXCore core)
 {
     core.RegisterServiceProvider(new I18NProvider());
     return(core);
 }
Beispiel #19
0
 public Task <XException> OnStart(IXCore core)
 => core.Services.Get <IVFSInternal>().Start();
Beispiel #20
0
 public void OnServiceRegister(IXCore core)
 {
     core.Services.BindBuiltInService <IAssetService, IVFS, VFSKit>()
     .SetAlias <IVFSInternal>();
 }
Beispiel #21
0
 public void OnServiceRegister(IXCore core)
 {
     core.Services.BindBuiltInService <ILocalizationService, II18N, I18NManager>()
     .SetAlias <II18NInternal>();
 }
Beispiel #22
0
        //private LuaFunction m_EntryFunc;

        //private CustomLoadHandlerManager m_CustomLoadHandlerManager = new CustomLoadHandlerManager();

        public TypeScriptManager(IAssetService buildInAssets)
        {
            m_Assets = buildInAssets;
            m_Core   = XCore.GetMainInstance();
            //m_JsVM = new JsEnv(new XTSLoader(buildInAssets, c_InternalLuaSign, ));
        }
Beispiel #23
0
 public void OnInit(IXCore core)
 {
 }
Beispiel #24
0
 public void OnServiceRegister(IXCore core)
 {
     core.Services.Singleton <IUIKit, UIManager>()
     .SetAlias <IUIKitInternal>();
 }
Beispiel #25
0
 public Task <bool> OnInit()
 {
     mCore = XCore.GetMainInstance();
     return(Task.FromResult(true));
 }
Beispiel #26
0
 public Task <XException> OnStart(IXCore core)
 {
     return(core.Services.Get <IUIKitInternal>().Start());
 }
Beispiel #27
0
 public static IXCore UseVFS(this IXCore core)
 {
     core.RegisterServiceProvider(new VFSProvider());
     return(core);
 }
 public Task <XException> OnInit(IXCore core) => Task.FromResult <XException>(null);
Beispiel #29
0
 public void OnStart(IXCore core)
 {
 }
Beispiel #30
0
 public Task <XException> OnInit(IXCore core)
 {
     return(Task.FromResult <XException>(null));
 }