InputLaunchCommand.lua 797 B

12345678910111213141516171819202122232425262728
  1. local InputLaunchCommand = class('InputLaunchCommand', framework.SimpleCommand)
  2. function InputLaunchCommand:ctor()
  3. end
  4. function InputLaunchCommand:execute(note)
  5. local facade = global.Facade
  6. local data = note:getBody()
  7. local skillID = data.skillID
  8. local destPos = data.destPos
  9. local targetID = data.targetID
  10. local priority = data.priority
  11. local launchType = data.launchType
  12. if not skillID then
  13. return nil
  14. end
  15. local inputProxy = facade:retrieveProxy( global.ProxyTable.PlayerInputProxy )
  16. inputProxy:SetLaunchSkillID(skillID, priority, launchType)
  17. inputProxy:SetLaunchTargetID(targetID)
  18. inputProxy:SetLaunchTargetPos(destPos)
  19. end
  20. return InputLaunchCommand