gameActorMonsterWall.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. local gameActorMonster = require("actor/gameActorMonster")
  2. local gameActorMonsterWall = class('gameActorMonsterWall', gameActorMonster)
  3. local optionsUtils = requireProxy("optionsUtils")
  4. function gameActorMonsterWall:ctor()
  5. gameActorMonsterWall.super.ctor(self)
  6. self.mOpenState = false
  7. end
  8. function gameActorMonsterWall:init()
  9. gameActorMonsterWall.super.init(self)
  10. self:SetAdditionZorder(45)
  11. self.mOpenState = false
  12. end
  13. function gameActorMonsterWall:updateAnimation()
  14. self.mAnimAct = global.MMO.ANIM_IDLE
  15. local animDir = self:getFixAnimDir() or self.mOrient
  16. --
  17. local isLoop = false
  18. local speed = 1
  19. if self.mAnimation then
  20. self.mAnimation:Play(self.mAnimAct, animDir, isLoop, speed)
  21. end
  22. if self.mAttachAnim then
  23. self.mAttachAnim:Play(self.mAnimAct, animDir, isLoop, speed)
  24. end
  25. if self.mStopAnimFrameIndex then
  26. self:StopAllAnimation(self.mStopAnimFrameIndex)
  27. end
  28. self.mOpenState = self:GetHP() <= 0
  29. global.sceneManager:MarkCanWalk(self:GetMapX(), self:GetMapY(), self.mOpenState)
  30. end
  31. return gameActorMonsterWall