您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

45 行
1.0 KiB

  1. local ZPDef = ZPFramework.ZPImport("zp_base.luaScript.ZPDef")
  2. local ZPFuc = ZPFramework.ZPImport("zp_base.luaScript.ZPFunctions")
  3. local xichongCard = class("xichongCard",function()
  4. local node=cc.ImageView:create()
  5. return node
  6. end)
  7. function xichongCard:ctor(value,viewId)
  8. self.value=value
  9. self.viewId=viewId
  10. --self.mType = mType
  11. --self.colorType = colorType or ZPDef.ColorType.White
  12. --self.desktopType = desktopType or ZPDef.DesktopType.ThreeD
  13. local fileName = ZPFuc.getZPCardImgByValue(value,ZPDef.CardType.CARD_TYPE_GROUPCARD,ZPDef.GameStyleType.JINGDIAN)
  14. self:setVisible(true)
  15. self:loadTextureFromPlist(fileName)
  16. self:setCardRoataition(viewId)
  17. end
  18. function xichongCard:setCardRoataition(viewId)
  19. if viewId == 1 then
  20. self:setEulerRotation(cc.vec3(0, 0, 180))
  21. elseif viewId == 2 then
  22. self:setEulerRotation(cc.vec3(0, 0, -90))
  23. elseif viewId == 3 then
  24. self:setEulerRotation(cc.vec3(0, 0, 0))
  25. elseif viewId == 4 then
  26. self:setEulerRotation(cc.vec3(0, 0, 90))
  27. end
  28. end
  29. return xichongCard