| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- import TableView from "../../component/TableView";
- import { BannerAdType, InterFullAdType } from "../../data/GameData";
- const {ccclass, property} = cc._decorator;
- @ccclass
- export default class CashOutBill extends cc.Component {
- @property({ displayName: '滚动视图', type: cc.ScrollView })
- private scroll_view: cc.ScrollView = null;
- @property({ displayName: '提示文本节点', type: cc.Node})
- private node_tip: cc.Node = null;
- @property({ displayName: '提示文本节点2', type: cc.Node})
- private node_tip2: cc.Node = null;
- private tableview: TableView = null;
- onLoad(){
- this.tableview = this.scroll_view.node.getComponent(TableView);
- }
- start () {
-
- let billData = gData.gameData.playerProp.cashOutBillData;
- if(billData && billData.billDetailInfoList.length > 0){
- this.scroll_view.node.emit('srollview-init', billData.billDetailInfoList);
- this.scroll_view.vertical = false;
- cc.tween(this.node).delay(0.06).call(() => {
- let allItem = this.tableview.getFrontPositionItemByCount(5);
- for (let i = 0; i != allItem.length; ++i) {
- allItem[i].x = 600;
- cc.tween(allItem[i]).delay(i * 0.1 + 0.2).to(0.3, { x: 0 }, cc.easeSineOut()).start();
- }
- }).delay(1).call(() => {
- this.scroll_view.vertical = true;
- }).start();
- if(billData.isShowTip){
- this.node_tip.active = true;
- }
- }else{
- this.node_tip.active = false;
- this.node_tip2.active = true;
- }
- }
- onEnable(){
- mk.ad.showBanner(BannerAdType.banner_click_10);
- }
- onDisable(){
- mk.ad.destoryBanner();
- }
- onDestroy(){
- // gData.adData.checkShowFullInter(1, InterFullAdType.interstitial2_init_4, ()=>{
- // gData.gameData.popTableScreenADLogic(18);
- // });
- }
- // update (dt) {}
- }
|