| 
 
| 赞 | 1 |  
| VIP | 0 |  
| 好人卡 | 5 |  
| 积分 | 1 |  
| 经验 | 22107 |  
| 最后登录 | 2017-7-19 |  
| 在线时间 | 492 小时 |  
 Lv1.梦旅人 
	梦石0 星屑50 在线时间492 小时注册时间2013-6-15帖子206 | 
| 
为了得到50.times这个等待的判定,我做了几次试验,第一次
x
加入我们,或者,欢迎回来。您需要 登录 才可以下载或查看,没有帐号?注册会员  然后测试,按下Z,然后的出的是先等待,再换角色图像,然后又改了一下复制代码class Scene_Map
   GetKeyState = Win32API.new("user32","GetAsyncKeyState",['I'],'I')
  alias keyboard update
  def update
    keyboard
     if Input.press?(:C)
      $game_actors[1].set_graphic("Actor1", 1, "Actor1", 1)
      $game_player.refresh
      50.times {
        Graphics.update
      }
     end
  end
end
结果还是先等待,那么为什么明明是更新角色图像的代码在前,还是会先等待,再变角色图像呢?复制代码class Scene_Map
   GetKeyState = Win32API.new("user32","GetAsyncKeyState",['I'],'I')
  alias keyboard update
  def update
    keyboard
     if Input.press?(:C)
      $game_actors[1].set_graphic("Actor1", 1, "Actor1", 1)
      $game_player.refresh
       if $game_actors[1].set_graphic("Actor1", 1, "Actor1", 1)
        50.times {
         Graphics.update
        }
       end
     end
  end
end
 | 
 |