| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- const { ccclass, property } = cc._decorator;
- @ccclass
- export default class FarmItem extends cc.Component{
- @property({displayName: '图标', type: cc.Sprite})
- private sp_icon: cc.Sprite = null;
- @property({displayName: '名字描述', type: cc.Label})
- private lbl_nameDes: cc.Label = null;
- @property({displayName: '描述', type: cc.Label})
- private lbl_des: cc.Label = null;
- @property({displayName: '领奖按钮', type: cc.Node})
- private node_ungetBtn: cc.Node = null;
- @property({displayName: '已领奖按钮', type: cc.Node})
- private node_getBtn: cc.Node = null;
- @property({displayName: '未解锁按钮', type: cc.Node})
- private node_unluckBtn: cc.Node = null;
- @property({displayName: '红点', type: cc.Node})
- private node_redPoint: cc.Node = null;
- public setItemData(data)
- {
- //this.InitUI(data);
- }
- private async InitUI(data)
- {
- this.sp_icon.spriteFrame = await mk.loader.load('module/turnable/texture/hb' + 1, cc.SpriteFrame);
- }
- private clickUnGetRewardBtn(){
- mk.audio.playEffect("button");
- }
- private clickUnluckBtn(){
- mk.audio.playEffect("button");
- mk.tip.pop('未解锁');
- }
- private clickGetRewardBtn(){
- mk.audio.playEffect("button");
- mk.tip.pop('已领取');
- }
- }
|