/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { // TODO: Add your initialization logic here ui = new UserInterface(GraphicsDevice); Player = new InputActor(1, new MouseDevice(), new KeyboardDevice(PlayerIndex.One, Window.Handle)); //Kernel.Bind<InputActor>().ToConstant(player); Components.Add(Player); ui.Actors.Add(Player); var statLog = new StatisticTextLog(ui.Root, Content.Load <SpriteFont>("Consolas"), true); statLog.SetPoint(Points.TopLeft, 10, 10); frameTime = Statistic.Get("Misc.Time", "{0:00.00}ms"); fps = new FrequencyTracker("Misc.FPS"); var console = new CommandConsole(this, Content.Load <SpriteFont>("Consolas"), ui.Root); Kernel.Bind <CommandConsole>().ToConstant(console); screens = new ScreenManager(); screens.Push(Kernel.Get <MainMenu>()); base.Initialize(); }
internal Instance() { Observer = new SimulationObserver(this); StockInfo = new StockInformation(this); MetaInfoManager = new MetaInformationManager(this); FrequencyTracker = new FrequencyTracker(this); ElementMetaInfoTracker = new ElementMetaInfoTracker(this); BotCrashHandler = new BotCrashHandler(this); SharedControlElements = new SharedControlElementsContainer(this); }