public LuaMenu(FreelancerGame g) : base(g) { api = new LuaAPI(this); ui = new XmlUIManager(g, "menu", api, g.GameData.GetInterfaceXml("mainmenu")); ui.OnConstruct(); ui.Enter(); g.GameData.PopulateCursors(); g.CursorKind = CursorKind.None; intro = g.GameData.GetIntroScene(); scene = new Cutscene(intro.Scripts, Game); scene.Update(TimeSpan.FromSeconds(1f / 60f)); //Do all the setup events - smoother entrance FLLog.Info("Thn", "Playing " + intro.ThnName); cur = g.ResourceManager.GetCursor("arrow"); GC.Collect(); //crap g.Sound.PlayMusic(intro.Music); #if DEBUG g.Keyboard.KeyDown += Keyboard_KeyDown; #endif FadeIn(0.1, 0.3); }
public SpaceGameplay(FreelancerGame g, GameSession session) : base(g) { FLLog.Info("Game", "Entering system " + session.PlayerSystem); g.ResourceManager.ClearTextures(); //Do before loading things this.session = session; #if false pyw = new DebugGraph(); pyw.AddLine(Color4.Red, 240, -1, 1); pyw.AddLine(Color4.Green, 240, -1, 1); pyw.AddLine(Color4.Blue, 240, -1, 1); pyw.X = 850; pyw.Y = 10; pyw.Width = 170; pyw.Height = 124; #endif sys = g.GameData.GetSystem(session.PlayerSystem); loader = new LoadingScreen(g, g.GameData.LoadSystemResources(sys)); ui = new UiContext(g, "hud.xml"); ui.GameApi = uiApi = new LuaAPI(this); ui.Start(); }
public TextElement(XInt.StyleText style) { ID = style.ID; Style = style; Lua = new LuaAPI(this); }
public XmlUIElement(XmlUIManager manager) { this.Manager = manager; Lua = new LuaAPI(this); }
public XmlUIElement(XmlUIScene scene) { this.Scene = scene; Lua = new LuaAPI(this); }