Ejemplo n.º 1
0
 static bool UpdateInput()
 {
     if (Input.Query(Keys.Space))
     {
         // Do something
     }
     return(false);
 }
        static bool UpdateInput()
        {
            if (Input.Query(Keys.A))
            {
                m_camera.Locator.MoveLocal(-20.0f, 0.0f, 0.0f);
            }
            if (Input.Query(Keys.D))
            {
                m_camera.Locator.MoveLocal(20.0f, 0.0f, 0.0f);
            }
            if (Input.Query(Keys.W))
            {
                m_camera.Locator.MoveLocal(0.0f, 0.0f, 20.0f);
            }
            if (Input.Query(Keys.S))
            {
                m_camera.Locator.MoveLocal(0.0f, 0.0f, -20.0f);
            }
            if (Input.Query(Keys.Up))
            {
                m_camera.Locator.Pitch(0.05f);
            }
            if (Input.Query(Keys.Down))
            {
                m_camera.Locator.Pitch(-0.05f);
            }
            if (Input.Query(Keys.Left))
            {
                m_camera.Locator.Heading(-0.05f);
            }
            if (Input.Query(Keys.Right))
            {
                m_camera.Locator.Heading(0.05f);
            }
            if (Input.Query(Keys.Escape))
            {
                return(true);
            }

            return(false);
        }
Ejemplo n.º 3
0
        static bool UpdateInput()
        {
            if (m_spaceDownLastFrame == false)
            {
                if (Input.Query(Keys.Space))
                {
                    m_crypt.SwapDisplayMode();
                }
            }
            if (Input.Query(Keys.Space) == false)
            {
                m_spaceDownLastFrame = false;
            }
            else
            {
                m_spaceDownLastFrame = true;
            }

            if (Input.Query(Keys.A))
            {
                m_camera.Locator.MoveLocal(-20.0f, 0.0f, 0.0f);
            }
            if (Input.Query(Keys.D))
            {
                m_camera.Locator.MoveLocal(20.0f, 0.0f, 0.0f);
            }
            if (Input.Query(Keys.W))
            {
                m_camera.Locator.MoveLocal(0.0f, 0.0f, 20.0f);
            }
            if (Input.Query(Keys.S))
            {
                m_camera.Locator.MoveLocal(0.0f, 0.0f, -20.0f);
            }
            if (Input.Query(Keys.Up))
            {
                m_camera.Locator.Pitch(0.05f);
            }
            if (Input.Query(Keys.Down))
            {
                m_camera.Locator.Pitch(-0.05f);
            }
            if (Input.Query(Keys.Left))
            {
                m_camera.Locator.Heading(-0.05f);
            }
            if (Input.Query(Keys.Right))
            {
                m_camera.Locator.Heading(0.05f);
            }
            if (Input.Query(Keys.Escape))
            {
                return(true);
            }
            return(false);
        }