MonsterCaveCommand.lua 691 B

123456789101112131415161718192021222324
  1. local MonsterCaveCommand = class('MonsterCaveCommand', framework.SimpleCommand)
  2. local optionsUtils = requireProxy("optionsUtils")
  3. function MonsterCaveCommand:ctor()
  4. end
  5. function MonsterCaveCommand:execute(notification)
  6. local data = notification:getBody()
  7. local actor = data.actor
  8. if not actor then
  9. return false
  10. end
  11. local inputProxy = global.Facade:retrieveProxy(global.ProxyTable.PlayerInputProxy)
  12. local autoProxy = global.Facade:retrieveProxy(global.ProxyTable.Auto)
  13. local actorID = actor:GetID()
  14. if inputProxy:GetTargetID() == actorID then
  15. inputProxy:ClearTarget()
  16. end
  17. end
  18. return MonsterCaveCommand