You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 line
738 B

  1. local Mahjong3DGroupGang = MJFramework.MJFrameworkClassImprot("mj.luaScript.Common.3d.Mahjong3DGroupGang")
  2. local GroupGang3D = class("GroupGang3D", Mahjong3DGroupGang)
  3. function GroupGang3D:ctor(values, viewId, groupIndex, cardNum)
  4. self._mjNum = cardNum or 0
  5. GroupGang3D.super.ctor(self, values, viewId, groupIndex, cardNum)
  6. end
  7. function GroupGang3D:customRefresh(...)
  8. GroupGang3D.super.customRefresh(...)
  9. local mjCards = self:getCards()
  10. if mjCards[4] and self._mjNum >= 4 then
  11. mjCards[4]:refreshCardNum(self._mjNum, self:getGroupIndex())
  12. end
  13. end
  14. function GroupGang3D:setCardNum(mjNum)
  15. self._mjNum = mjNum
  16. self:customRefresh()
  17. end
  18. function GroupGang3D:getCardNum()
  19. return self._mjNum or 0
  20. end
  21. return GroupGang3D