Пример #1
0
    static void Main(string[] args)
    {
        var icon   = ImageLoader.ImageToBytesStatic(Image.Load <Rgba32>("Data/Images/Misc/ICON_small.png"), false);
        var cursor = ImageLoader.ImageToBytesStatic(Image.Load <Rgba32>("Data/Images/GUI/Pulse_Glass.png"), false);

        GameKernel.Init(
            "Depth of Cold",
            new OpenTK.Windowing.Common.Input.Image(icon.width, icon.height, icon.ToByteArray()),
            new OpenTK.Windowing.Common.Input.MouseCursor(0, 0, cursor.width, cursor.height, cursor.ToByteArray()),
            args);

        Kernel.GameInit += () =>
        {
            GameKernel.screenManager.scenarioScreen.textManager.InterfaceCreating   += TextManager_InterfaceCreating;
            GameKernel.screenManager.scenarioScreen.textManager.InterfaceDestroying += TextManager_InterfaceDestroying;
            GameKernel.screenManager.scenarioScreen.GameStarting += ScenarioScreen_GameStarting;
            GameKernel.screenManager.GameStart(typeof(MainMenu), typeof(SettingsScreen), typeof(TitleScreen), typeof(MiniMenu), typeof(ExitMenu));
            GameKernel.screenManager.AddScreenToGame(typeof(LoadMenu));
        };

        GameKernel.StartGame();
    }
Пример #2
0
 private void Awake()
 {
     kernel = GameKernel.GetInstance();
     kernel.Init();
 }