InputIdleCommand.lua 784 B

123456789101112131415161718192021222324
  1. local InputIdleCommand = class('InputIdleCommand', framework.SimpleCommand)
  2. function InputIdleCommand:ctor()
  3. end
  4. function InputIdleCommand:execute(note)
  5. local facade = global.Facade
  6. local inputProxy = facade:retrieveProxy( global.ProxyTable.PlayerInputProxy )
  7. local autoProxy = facade:retrieveProxy( global.ProxyTable.Auto )
  8. -- auto move begin
  9. if not inputProxy:GetMoveInterruptFlag() and autoProxy:IsAutoMoveState() then
  10. facade:sendNotification( global.NoticeTable.AutoMoveEnd )
  11. end
  12. -- clear input move data, except for interrupt move
  13. if not inputProxy:GetMoveInterruptFlag() and inputProxy:GetPathPointSize() > 0 then
  14. inputProxy:ClearMove()
  15. end
  16. end
  17. return InputIdleCommand