| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- import { ProductType } from "../../data/GameData";
- const { ccclass, property } = cc._decorator;
- @ccclass
- export default class ItemName extends cc.Component{
- @property({displayName: '复选组件', type: cc.Toggle})
- public toggle: cc.Toggle = null;
- @property({displayName: '名字', type: cc.Label})
- public lbl_name: cc.Label = null;
- @property({displayName: '是否解锁标识', type: cc.Node})
- public sp_luck: cc.Node = null;
- @property({displayName: '红点', type: cc.Node})
- public node_redPoint: cc.Node = null;
- @property({displayName: '按钮', type: cc.Button})
- public btn_luck: cc.Button = null;
- pt:ProductType = ProductType.nzw;
- start(){
- }
- InitUI(name: string, luck: boolean, showRedPoint: boolean)
- {
- }
- setShowUIState(luck: boolean, showRedPoint: boolean, id: ProductType)
- {
- this.sp_luck.active = luck;
- this.btn_luck.node.active = luck;
- this.node_redPoint.active = showRedPoint;
- this.pt = id;
- }
- clickLuckBtn()
- {
- let data = gData.gameData.getProductArrByType(this.pt);
- if(data && data.length> 0 && data[0].unlock == 2)
- {
- if(gData.gameData.playerProp.orderData){
- let times = data[0].value - gData.gameData.playerProp.orderData.overTimes;
- mk.tip.pop(`订单提现${times}次后解锁`);
- }else{
- mk.tip.pop(`提现订单后解锁`);
- }
- }
- }
- }
|