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; }
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(); } }
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)); }