https://github.com/gaboolic/auto-machine
玩游戏自动机,通过图像识别技术自动玩“弹弹堂”
https://github.com/gaboolic/auto-machine
Last synced: over 1 year ago
JSON representation
玩游戏自动机,通过图像识别技术自动玩“弹弹堂”
- Host: GitHub
- URL: https://github.com/gaboolic/auto-machine
- Owner: gaboolic
- Created: 2015-08-03T02:00:14.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-01-03T06:26:49.000Z (over 9 years ago)
- Last Synced: 2025-03-23T23:42:56.207Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 17.6 MB
- Stars: 9
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# auto-machine
玩游戏自动机
目前实现了弹弹堂玩游戏自动机。
弹弹堂状态机:
就绪->准备发射->发射中->发射完毕->就绪
程序检测到ready变为就绪状态。
程序在就绪状态按下空格,是准备发射状态。
准备发射状态蓄力,释放空格,变为发射中状态。
发射中状态会变为发射完毕状态。
...检测到ready变为就绪状态。
用java注解来描述:
@States(
{
@State(name = "READY"),
@State(name = "PRE_SHOOT"),
@State(name = "SHOOTING"),
@State(name = "SUF_SHOOT")
})
@Transitions({
//就绪 -> 准备发射 on 按下空格
@Transit(from = "READY", to = "PRE_SHOOT", on = "PRE_SHOOT", callMethod = "fromReadyToPreShootOnPreShoot"),
@Transit(from = "READY", to = "READY", on = "READY", callMethod = "fromReadyToReadyOnReady"),
//准备发射 -> 发射中 on 释放空格
@Transit(from = "PRE_SHOOT", to = "SHOOTING", on = "SHOOT", callMethod = "fromPreShootToShootingOnShoot"),
//发射中 -> 发射完成
@Transit(from = "SHOOTING", to = "SUF_SHOOT", on = "SHOOT_DONE_BY_MAN", callMethod = "fromShootingToSufShootOnShootDoneByMan"),
@Transit(from = "SHOOTING", to = "SUF_SHOOT", on = "SHOOT_DONE", callMethod = "fromShootingToSufShootOnShootDone"),
//发射完成 -> 就绪
@Transit(from = "SUF_SHOOT", to = "READY", on = "READY_BY_MAN", callMethod = "fromSufShootToReadyOnReadyByMan"),
@Transit(from = "SUF_SHOOT", to = "READY", on = "READY", callMethod = "fromSufShootToReadyOnReady")
})
@StateMachineParameters(stateType = DandanTangState.class, eventType = DandanTangEvent.class, contextType = Context.class)