打印本文 打印本文 关闭窗口 关闭窗口
NeHe的opengl教程delphi版(7)----滤波
作者:武汉SEO闵涛  文章来源:敏韬网  点击数3092  更新时间:2009/4/23 18:37:25  文章录入:mintao  责任编辑:mintao
nbsp;     //记住在以后的教程中如果xspeed、yspeed的值增加的话,立方体就转的更快。
               //如果一直按着某个方向键,立方体会在那个方向上转的越快。
               If keys[VK_UP] Then      // Up方向键按下了么?
                  xspeed := xspeed - 0.01; //若是,减少xspeed
               If keys[VK_DOWN] Then    //Down方向键按下了么?
                  xspeed := xspeed + 0.01; //若是,增加xspeed
               If keys[VK_RIGHT] Then   //Right方向键按下了么?
                  yspeed := yspeed + 0.01; //若是,增加yspeed
               If keys[VK_LEFT] Then    //Left方向键按下了么?
                  yspeed := yspeed - 0.01; //若是, 减少yspeed

               If (keys[VK_ESCAPE]) Then // 如果按下了ESC键
                  finished := True

运行一下看看效果

 

 

上一页  [1] [2] [3] [4] 

打印本文 打印本文 关闭窗口 关闭窗口