|
@@ -15,12 +15,10 @@ export class results extends Component {
|
|
|
@property(Node) btn_restart:Node = null
|
|
|
@property(Node) lab_scores:Node = null
|
|
|
@property(Node) btn_back_home:Node = null
|
|
|
- @property(Node) first_over_node:Node = null
|
|
|
- @property(Node) not_first_over_node:Node = null
|
|
|
@property(Node) btn_video_reLife:Node = null
|
|
|
- @property(Node) btn_share_reLife:Node = null
|
|
|
- @property(Node) check_back_home:Node = null
|
|
|
@property(Node) unlock_car:Node = null
|
|
|
+ @property(Node) btn_share:Node = null
|
|
|
+ @property(Node) lab_des:Node = null
|
|
|
private call_back = null
|
|
|
private back_home_cb = null
|
|
|
start() {
|
|
@@ -36,11 +34,6 @@ export class results extends Component {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- uiManager.Instance().onButtonListen(this.check_back_home,()=>{
|
|
|
- if(this.back_home_cb){
|
|
|
- this.back_home_cb()
|
|
|
- }
|
|
|
- })
|
|
|
|
|
|
uiManager.Instance().onButtonListen(this.btn_video_reLife,()=>{
|
|
|
SdkUtil.showVideoAd(config.ADS_CONFIG.GAME_RELIFE_VIDEO,()=>{
|
|
@@ -51,12 +44,12 @@ export class results extends Component {
|
|
|
})
|
|
|
})
|
|
|
|
|
|
- uiManager.Instance().onButtonListen(this.btn_share_reLife,()=>{
|
|
|
+ uiManager.Instance().onButtonListen(this.btn_share,()=>{
|
|
|
SdkUtil.shareGame(config.ADS_CONFIG.GAME_RELIFE_SHARE_TITLE,()=>{
|
|
|
- if(this.call_back){
|
|
|
- this.call_back(true)
|
|
|
- this.close()
|
|
|
- }
|
|
|
+ // if(this.call_back){
|
|
|
+ // this.call_back(true)
|
|
|
+ // this.close()
|
|
|
+ // }
|
|
|
})
|
|
|
})
|
|
|
}
|
|
@@ -68,8 +61,7 @@ export class results extends Component {
|
|
|
|
|
|
public show(scores:number,call,back_home_cb,isFristOverGame:boolean){
|
|
|
this.back_home_cb = back_home_cb
|
|
|
- this.first_over_node.active = isFristOverGame
|
|
|
- this.not_first_over_node.active =!isFristOverGame
|
|
|
+ this.btn_video_reLife.active = isFristOverGame
|
|
|
http.post(config.API.sync_integral,{"integral":scores},(err,data)=>{
|
|
|
if(!err){
|
|
|
let d = JSON.parse(data)
|