cc.Class({ extends: cc.Component, properties: { CardID:'0', CardDetails:null, CardWord:{ default: null, type: cc.Node }, GamePlayPageJS: null, CardNode:{ default: null, type: cc.Node }, CardBtn:{ default: null, type: cc.Node }, CardBack:{ default: null, type: cc.Node }, }, onLoad(){ }, start () { }, SetDetails(CardID,CardDetails){ this.CardID = CardID; this.CardDetails = CardDetails; this.CardWord.getComponent(cc.Label).string = CardDetails.CardWord; this.CardBtn.color = CardDetails.CardIMG;//图片暂时用颜色代替 }, CardOnClick(){ this.GamePlayPageJS.CompareCards(this.CardID,this.CardDetails.CardName,this.CardDetails,this.CardNode); }, CardClear(){ this.CardBtn.active = false; this.CardBack.active = false; }, CardReset(){ this.CardBtn.active = true; this.CardBack.active = true; }, });