ActorEnterIdleCommand.lua 460 B

123456789101112131415161718192021
  1. local ActorEnterIdleCommand = class('ActorEnterIdleCommand', framework.SimpleCommand)
  2. function ActorEnterIdleCommand:ctor()
  3. end
  4. function ActorEnterIdleCommand:execute(note)
  5. local data = note:getBody()
  6. local actor = data.actor
  7. if not actor then
  8. return
  9. end
  10. if global.MMO.ACTION_IDLE == actor:GetAction() then
  11. return
  12. end
  13. actor:SetAction(global.MMO.ACTION_IDLE)
  14. end
  15. return ActorEnterIdleCommand