Exemple #1
0
        // elapsedSeconds : 전 프레임에서 지난 시간
        public void UpdateWorld(float elapsedSeconds)
        {
            if (!isPlaying)
            {
                if (GmfKey.IsKeyPressed(Keys.Enter))
                {
                    isPlaying = true;
                    world     = new GameCore.World();
                }
                else
                {
                    return;
                }
            }

            if ((int)(totalElapsedSeconds / updateInterval)
                != (int)((totalElapsedSeconds + elapsedSeconds) / updateInterval))
            {
                isPlaying = world.Update();
            }
            totalElapsedSeconds += elapsedSeconds;
        }
Exemple #2
0
 private void MainForm_KeyUp(object sender, KeyEventArgs e)
 {
     GmfKey.SetKeyPressed(e.KeyCode, false);
 }
Exemple #3
0
 private void MainForm_KeyDown(object sender, KeyEventArgs e)
 {
     GmfKey.SetKeyPressed(e.KeyCode, true);
 }