You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.5 KiB
38 lines
1.5 KiB
//#region 文件引入
|
|
import { _decorator, Button, Component, Label, Node, sp, Sprite,Animation, RichText } from "cc";
|
|
import BaseUIForm from "../../Mgr_UI/BaseUIForm";
|
|
import MathUtils from "../../ExUtils/MathUtils";
|
|
import { PropType } from "../../const/GameEnum";
|
|
import UIMgr from "../../Mgr_UI/UIMgr";
|
|
import { Utils } from "../../ExUtils/Utils";
|
|
import MesMgr from "../../MesEvent/MesMgr";
|
|
import { EGlobalEvent } from "../../MesEvent/EGlobalEvent";
|
|
import { MainConfig } from "db://assets/Launch/_MainConfig";
|
|
//#endregion 文件引入
|
|
const {ccclass, property,menu} = _decorator;
|
|
@ccclass("PopFeedGetCoinUI_Proxy")
|
|
export default class PopFeedGetCoinUI_Proxy extends BaseUIForm{
|
|
//#region 节点自动生成
|
|
@property(Button)
|
|
btn_GetCoin: Button = null;
|
|
//#endregion 节点自动生成
|
|
|
|
onButtonClick(button:Button){
|
|
|
|
/**点击事件触发*/
|
|
switch (button) {
|
|
case this.btn_GetCoin:
|
|
const random = MathUtils.randomRangeInt(2, 20);
|
|
const rewcoin = random * 100000;
|
|
this.mDataMgr.Token.addToken(PropType.eGold, rewcoin);
|
|
UIMgr.Ins.ShowTipsUI("获得铜钱:" + Utils.StringUtils.formatLargeNumber(rewcoin));
|
|
MainConfig.isFeedEnter = true;
|
|
MesMgr.event(EGlobalEvent.E_FEED_ENTER_GAME);
|
|
this.CloseUI();
|
|
break;
|
|
default:
|
|
ConsoleEx.Log(button);
|
|
break;
|
|
}
|
|
}
|
|
}
|