Пример #1
0
        private void Start()
        {
            assetCache  = new Dictionary <string, AssetLoader>();
            bundleCache = new Dictionary <string, AssetBundleLoader>();
            xmlCache    = new Dictionary <string, XMLLoader>();
            luaCache    = new Dictionary <string, LuaLoader>();
            state       = State.Idle;

            scripts = GameLink.Game.Components.Get <ScriptController>((int)ComponentKeys.LuaScripts);

            GameLink.Game.SceneComponents.GetOrRegister <Command <string> >((int)ComponentKeys.DeepLoadMod, Command <string> .Create).Handler = LoadMod;
        }
Пример #2
0
 public LuaLoader(ScriptController scripts, string modPath, string assetPath)
 {
     this.functions = new HashSet <string>();
     this.scripts   = scripts;
     if (string.IsNullOrEmpty(assetPath))
     {
         SetError(ErrorType.NullFilePath);
     }
     else
     {
         this.assetName = Path.Combine(modPath, assetPath) + ".lua";
         this.state     = State.Loading;
         Load();
     }
 }
Пример #3
0
 public ModErrorLog(AutoController scene)
 {
     scripts = scene.Game.Components.Get <ScriptController>((int)ComponentKeys.LuaScripts);
     scene.Components.GetOrRegister <Message <string> >((int)ComponentKeys.ModLoadError, Message <string> .Create)
     .Subscribe(new SimpleListener <string>(LogError));
 }