InputMiningCommand.lua 733 B

1234567891011121314151617181920212223242526
  1. local InputMiningCommand = class('InputMiningCommand', framework.SimpleCommand)
  2. function InputMiningCommand:ctor()
  3. end
  4. function InputMiningCommand:execute(note)
  5. local facade = global.Facade
  6. local data = note:getBody()
  7. local dest = data.dest
  8. local dir = data.dir
  9. local skillProxy = facade:retrieveProxy(global.ProxyTable.Skill)
  10. local inputProxy = facade:retrieveProxy(global.ProxyTable.PlayerInputProxy)
  11. -- 判断是否可以挖矿
  12. if 1 ~= skillProxy:CheckAbleToLaunch(global.MMO.SKILL_INDEX_DIG) then
  13. return
  14. end
  15. inputProxy:SetMiningDir(dir)
  16. inputProxy:SetMiningDest(dest)
  17. end
  18. return InputMiningCommand