コード例 #1
0
        static void Main(string[] args)
        {
            Jatek_Window = new RenderWindow(new SFML.Window.VideoMode(800, 600), "Dragon For Honor");

            Grafika.Jatek_Betoltese();

            Jatek();
        }
コード例 #2
0
ファイル: Game1.cs プロジェクト: KarsaiTamas/zarodoga
        /// <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
            Kepernyo_Felbontas();
            Grafika.InitializeGrafika(Content);
            UserInterface.Initialize(Content, BuiltinThemes.hd);
            IGUI.GUI_Betolt();
            Menu_Manager.Menu_Valtas(Menu_Manager.Menu.Fo_Menu);

            base.Initialize();
        }
コード例 #3
0
        static void Jatek()
        {
            while (Jatek_Window.IsOpen)
            {
                Jatek_Window.DispatchEvents();
                Jatek_Window.Clear(Color.Blue);

                Grafika.Render_Grafika();



                Jatek_Window.Display();
            }
        }
コード例 #4
0
ファイル: Game1.cs プロジェクト: KarsaiTamas/zarodoga
        /// <summary>
        /// This is called when the game should draw itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.Black);
            UserInterface.Active.Draw(spriteBatch);
            if (jatek_elinditva == true)
            {
                if (jatek_megallitva == false)
                {
                    tick       = (int)gameTime.TotalGameTime.TotalMilliseconds;
                    eltelt_ido = (tick - frame_ido);
                    frame_ido  = tick;

                    if (walk_timer < tick)
                    {
                        Game_Logic.Process_Movement();
                        walk_timer = tick + 30;
                    }
                    Check_Keys();
                    Game_Logic.Check_Movement();

                    Grafika.Grafika_Renderelese();

                    Menu_Manager.Jatek_Menu_Felhoz(Menu_Manager.Menu.Test);
                    UserInterface.Active.Draw(spriteBatch);
                }
            }
            if (Game_Logic.Menu_Behoz())
            {
                jatek_megallitva = true;
                Menu_Manager.Jatek_Menu_Felhoz(Menu_Manager.Menu.Jatek_Menu);
                UserInterface.Active.Draw(spriteBatch);
                if (Keyboard.GetState().IsKeyDown(Keys.Escape))
                {
                    jatek_megallitva = false;
                    Menu_Manager.Menu_Valtas(Menu_Manager.Menu.Jatek);
                }
            }



            // TODO: Add your drawing code here


            base.Draw(gameTime);
        }