|
- local ZPDef = ZPFramework.ZPImport("zp_base.luaScript.ZPDef")
- local ZPFuc = ZPFramework.ZPImport("zp_base.luaScript.ZPFunctions")
- local xichongCard = class("xichongCard",function()
- local node=cc.ImageView:create()
- return node
- end)
-
-
- function xichongCard:ctor(value,viewId)
-
- self.value=value
-
- self.viewId=viewId
-
- --self.mType = mType
-
- --self.colorType = colorType or ZPDef.ColorType.White
-
- --self.desktopType = desktopType or ZPDef.DesktopType.ThreeD
-
- local fileName = ZPFuc.getZPCardImgByValue(value,ZPDef.CardType.CARD_TYPE_GROUPCARD,ZPDef.GameStyleType.JINGDIAN)
-
- self:setVisible(true)
-
- self:loadTextureFromPlist(fileName)
-
- self:setCardRoataition(viewId)
- end
-
-
- function xichongCard:setCardRoataition(viewId)
- if viewId == 1 then
- self:setEulerRotation(cc.vec3(0, 0, 180))
- elseif viewId == 2 then
- self:setEulerRotation(cc.vec3(0, 0, -90))
- elseif viewId == 3 then
- self:setEulerRotation(cc.vec3(0, 0, 0))
- elseif viewId == 4 then
- self:setEulerRotation(cc.vec3(0, 0, 90))
- end
-
- end
-
-
- return xichongCard
|