예제 #1
0
파일: Game.cs 프로젝트: BlazorHub/CS50G
        public async Task Initialize()
        {
            await gameLoop.Initialize();

            await Graphics.Initialize();

            await Keyboard.Initialize();

            if (Mouse != null)
            {
                await Mouse?.Initialize();
            }

            gameLoop.OnUpdate   += OnUpdate;
            Keyboard.KeyPressed += OnKeyPressed;
            if (Mouse != null)
            {
                Mouse.MousePressed += OnMousePressed;
            }
        }