|
@@ -6,6 +6,9 @@ import { home_bottom_rank_item } from './home_bottom_rank_item';
|
|
import { GameManager } from '../../GameManager';
|
|
import { GameManager } from '../../GameManager';
|
|
import { tools } from '../../tools';
|
|
import { tools } from '../../tools';
|
|
import { home_honor } from './home_honor';
|
|
import { home_honor } from './home_honor';
|
|
|
|
+import { home_bottom_countdown } from './home_bottom_countdown';
|
|
|
|
+import { unLock_view } from '../unLock_view';
|
|
|
|
+import { userDataManager } from '../../manager/userDataManager';
|
|
const { ccclass, property } = _decorator;
|
|
const { ccclass, property } = _decorator;
|
|
|
|
|
|
@ccclass('home_bottom')
|
|
@ccclass('home_bottom')
|
|
@@ -18,6 +21,7 @@ export class home_bottom extends Component {
|
|
@property(Node) rank3_node:Node = null
|
|
@property(Node) rank3_node:Node = null
|
|
@property(Node) lab_week_score:Node = null
|
|
@property(Node) lab_week_score:Node = null
|
|
@property(Node) btn_wuxiancishu:Node = null
|
|
@property(Node) btn_wuxiancishu:Node = null
|
|
|
|
+ @property(Node) countdown_node:Node = null
|
|
|
|
|
|
start() {
|
|
start() {
|
|
uiManager.Instance().onButtonListen(this.btn_wenhao, ()=>{
|
|
uiManager.Instance().onButtonListen(this.btn_wenhao, ()=>{
|
|
@@ -30,19 +34,32 @@ export class home_bottom extends Component {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
uiManager.Instance().onButtonListen(this.btn_wuxiancishu, ()=>{
|
|
uiManager.Instance().onButtonListen(this.btn_wuxiancishu, ()=>{
|
|
- uiManager.Instance().showUi(config.UI.ui_unLock_view)
|
|
|
|
|
|
+ if(userDataManager.getUserIsFreeAds()) {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ uiManager.Instance().showUi(config.UI.ui_unLock_view, null, (node:Node)=>{
|
|
|
|
+ node.getComponent(unLock_view).initView((v:unLock_view)=>{
|
|
|
|
+ v.closeSelf()
|
|
|
|
+ this.reloadCountdown()
|
|
|
|
+ })
|
|
|
|
+ })
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
public init() {
|
|
public init() {
|
|
this.lab_week_score.getComponent(Label).string = tools.mine_rank_data.score + ''
|
|
this.lab_week_score.getComponent(Label).string = tools.mine_rank_data.score + ''
|
|
this.reloadHonorData()
|
|
this.reloadHonorData()
|
|
|
|
+ this.reloadCountdown()
|
|
this.reloadCountryRankData()
|
|
this.reloadCountryRankData()
|
|
}
|
|
}
|
|
|
|
|
|
private reloadHonorData() {
|
|
private reloadHonorData() {
|
|
this.img_honor.getComponent(home_honor).initView()
|
|
this.img_honor.getComponent(home_honor).initView()
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ private reloadCountdown() {
|
|
|
|
+ this.countdown_node.getComponent(home_bottom_countdown).startTime()
|
|
|
|
+ }
|
|
|
|
|
|
private reloadCountryRankData(){
|
|
private reloadCountryRankData(){
|
|
GameManager.requestRankList(0, (d_content)=>{
|
|
GameManager.requestRankList(0, (d_content)=>{
|