查看: 2456|回复: 5

[已经解决] 求助,我的游戏会在后台也可以按键盘

[复制链接]
梦石
0
星屑
12161
在线时间
4435 小时
注册时间
2014-4-11
回帖
5616

开拓者

发表于 2017-4-26 11:08:10 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
没有使用后台运行的脚本。
实际也没有后台运行,切出来过会切会去,还是刚才的进度。
就是键盘是可以操作的。

葱

梦石
26
星屑
13872
在线时间
2233 小时
注册时间
2012-12-12
回帖
569

极短28获奖

发表于 2017-4-26 15:04:12 | 显示全部楼层
某些脚本会造成这样的情况,看看是哪个脚本出问题了吧……

点评

↓ 电脑抽风,怒砸之!  发表于 2017-4-26 20:47
奇怪,现在又没那情况了。我并没有修改什么啊。  发表于 2017-4-26 15:40

▶ 葱兔の游戏列表 (´・ω・`)
回复

使用道具 举报

梦石
0
星屑
1381
在线时间
295 小时
注册时间
2014-6-24
回帖
93
发表于 2017-4-27 22:34:14 | 显示全部楼层
  1. #此脚本用于挂机获得经验之类所用。
  2. #
  3. #
  4. #打开后台  事件脚本:$_Start.call
  5. #关闭后台  事件脚本:$_Stop.call
  6. #
  7. unless $_Start


  8. $_Start = Win32API.new("Lib/BackgroundRunning","Start",'V','L')
  9. $_Stop = Win32API.new("Lib/BackgroundRunning","Stop",'V','L')
  10. $_OnFocus = Win32API.new("Lib/BackgroundRunning","OnFocus",'V','L')

  11. $_Start.call

  12. module Input
  13.   InputUpdate = method :update
  14.   InputTrigger = method :trigger?
  15.   InputPress = method :press?
  16.   InputRepeat = method :repeat?
  17.   InputDir4 = method :dir4
  18.   InputDir8 = method :dir8
  19.   def self.update
  20.     InputUpdate.call if $_OnFocus.call != 0
  21.   end
  22.   def self.trigger?(num)
  23.     return $_OnFocus.call != 0 ? InputTrigger.call(num) : false
  24.   end
  25.   def self.press?(num)
  26.     return $_OnFocus.call != 0 ? InputPress.call(num) : false
  27.   end
  28.   def self.repeat?(num)
  29.     return $_OnFocus.call != 0 ? InputRepeat.call(num) : false
  30.   end
  31.   def self.dir4
  32.     return $_OnFocus.call != 0 ? InputDir4.call : 0   
  33.   end
  34.   def self.dir8
  35.     return $_OnFocus.call != 0 ? InputDir8.call : 0   
  36.   end
  37. end


  38. end
复制代码


只有脚本可不行,需要在工程目录中增加这个: Lib.rar (19.1 KB, 下载次数: 75)

点评

不是这个问题,我没有加后台功能。  发表于 2017-4-28 00:44
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部