internal static LookUp GetLookUp() { if (lookup == null) { lookup = new LookUp(); } return lookup; }
public Plugin(DirectoryInfo directory, string name, string code) { Name = name; Code = code; RootDirectory = directory; Timers = new Dictionary <String, TimedEvent>(); Engine = new Engine(cfg => cfg.AllowClr(typeof(UnityEngine.GameObject).Assembly, typeof(uLink.NetworkPlayer).Assembly, typeof(PlayerInventory).Assembly)) .SetValue("Server", Server.GetServer()) .SetValue("DataStore", DataStore.GetInstance()) .SetValue("Util", Util.GetUtil()) .SetValue("World", World.GetWorld()) .SetValue("Lookup", LookUp.GetLookUp()) .SetValue("Plugin", this) .Execute(code); Logger.LogDebug(string.Format("{0} AllowClr for Assemblies: {1} {2} {3}", brktname, typeof(UnityEngine.GameObject).Assembly.GetName().Name, typeof(uLink.NetworkPlayer).Assembly.GetName().Name, typeof(PlayerInventory).Assembly.GetName().Name)); try { Engine.Invoke("On_PluginInit"); } catch { } }
internal static LookUp GetLookUp() { if (lookup == null) { lookup = new LookUp(); } return(lookup); }