| 赞 | 16  | 
 
| VIP | 0 | 
 
| 好人卡 | 0 | 
 
| 积分 | 23 | 
 
| 经验 | 0 | 
 
| 最后登录 | 2020-4-27 | 
 
| 在线时间 | 403 小时 | 
 
 
 
 
 
Lv3.寻梦者 
	- 梦石
 - 0 
 
        - 星屑
 - 2281 
 
        - 在线时间
 - 403 小时
 
        - 注册时间
 - 2018-11-9
 
        - 帖子
 - 249
 
 
 
 | 
	
6楼
 
 
 楼主 |
发表于 2019-1-16 17:08:14
|
只看该作者
 
 
 
 
下午稍微改了一下: 
- class Scene_Map < Scene_Base
 
 -   FindWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')
 
 -   HWnd = FindWindowEx.call(0, 0, 'RGSS Player', 0)
 
 -   SetWindowPos = Win32API.new('user32', 'SetWindowPos', 'liiiiip', 'i')
 
 -   GetWindowRect = Win32API.new('user32','GetWindowRect',['l','p'],'i')
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 更新画面
 
 -   #--------------------------------------------------------------------------
 
 -   alias _update update
 
 -   def update
 
 -     _update
 
 -     update_shake if Input.trigger?(:A)
 
 -   end
 
 -   def update_shake
 
 -     window_rect = "\0" * 16
 
 -     GetWindowRect.call(HWnd, window_rect)
 
 -     x,y,wr,wb = window_rect.unpack('llll')
 
 -     w = wr - x
 
 -     h = wb - y
 
 -     time = 0
 
 -     while time < 34
 
 -       Graphics.update
 
 -       time += 1
 
 -       case time
 
 -       when 0 then SetWindowPos.call(HWnd, 0, x - 50, y - 50, w, h, 0)
 
 -       when 2 then SetWindowPos.call(HWnd, 0, x, y, w, h, 0)
 
 -       when 4 then SetWindowPos.call(HWnd, 0, x , y - 50, w, h, 0)
 
 -       when 6 then SetWindowPos.call(HWnd, 0, x, y, w, h, 0)
 
 -       when 8 then SetWindowPos.call(HWnd, 0, x + 50, y - 50 , w, h, 0)
 
 -       when 10 then SetWindowPos.call(HWnd, 0, x, y, w, h, 0)
 
 -       when 12 then SetWindowPos.call(HWnd, 0, x + 50, y, w, h, 0)
 
 -       when 14 then SetWindowPos.call(HWnd, 0, x, y, w, h, 0)
 
 -       when 16 then SetWindowPos.call(HWnd, 0, x + 50, y + 50, w, h, 0)
 
 -       when 20 then SetWindowPos.call(HWnd, 0, x, y, w, h, 0)
 
 -       when 22 then SetWindowPos.call(HWnd, 0, x, y + 50, w, h, 0)
 
 -       when 24 then SetWindowPos.call(HWnd, 0, x, y, w, h, 0)
 
 -       when 26 then SetWindowPos.call(HWnd, 0, x - 50, y + 50, w, h, 0)
 
 -       when 28 then SetWindowPos.call(HWnd, 0, x, y, w, h, 0)
 
 -       when 30 then SetWindowPos.call(HWnd, 0, x - 50, y, w, h, 0)
 
 -       when 32 then SetWindowPos.call(HWnd, 0, x, y, w, h, 0)
 
 -       end
 
 -     end
 
 -   end
 
 - end
 
  复制代码 
 我是不是疯了? |   
 
 
 
 |