|
@@ -1,4 +1,4 @@
|
|
-import { _decorator, Component, Director, director, Enum, Game, game, instantiate, Label, log, Node, Prefab, resources, SpriteFrame, sys, tween, UITransform, Vec2, Vec3 } from 'cc';
|
|
|
|
|
|
+import { _decorator, Component, Director, director, Enum, Game, game, instantiate, Label, log, Node, Prefab, resources, SpriteFrame, sys, tween, UITransform, Vec2, Vec3, Animation } from 'cc';
|
|
import { config } from '../config';
|
|
import { config } from '../config';
|
|
import { gameManager } from '../gameManager';
|
|
import { gameManager } from '../gameManager';
|
|
import { play_list_item } from './play_list_item';
|
|
import { play_list_item } from './play_list_item';
|
|
@@ -21,7 +21,6 @@ import { view_game_play_ji_yi_li } from '../play_list/ji_yi_li/view_game_play_ji
|
|
import { view_game_play_zhao_bu_tong } from '../play_list/zhao_bu_tong/view_game_play_zhao_bu_tong';
|
|
import { view_game_play_zhao_bu_tong } from '../play_list/zhao_bu_tong/view_game_play_zhao_bu_tong';
|
|
import { StatisticsManager } from '../framework/statisticsManager';
|
|
import { StatisticsManager } from '../framework/statisticsManager';
|
|
import { reward_box_page } from './reward_box_page';
|
|
import { reward_box_page } from './reward_box_page';
|
|
-import { reward_box } from './reward_box';
|
|
|
|
const { ccclass, property } = _decorator;
|
|
const { ccclass, property } = _decorator;
|
|
export enum ETest {
|
|
export enum ETest {
|
|
None = 0,
|
|
None = 0,
|
|
@@ -81,10 +80,10 @@ export class homepage extends Component {
|
|
ClientEvent.on(config.EVENT_MSG.ON_SHOW_REWARD_VIEW,this.onShowRewardView.bind(this),this);
|
|
ClientEvent.on(config.EVENT_MSG.ON_SHOW_REWARD_VIEW,this.onShowRewardView.bind(this),this);
|
|
ClientEvent.on(config.EVENT_MSG.ON_USER_LOGIN_SUCCESS,this.onUserLoginSuccess.bind(this),this);
|
|
ClientEvent.on(config.EVENT_MSG.ON_USER_LOGIN_SUCCESS,this.onUserLoginSuccess.bind(this),this);
|
|
}
|
|
}
|
|
- onUserLoginSuccess() {
|
|
|
|
|
|
+ onUserLoginSuccess() {
|
|
if(SdkUtil.ttCheckSceneShowRewards()&&gameManager.get_user_is_sign()==false) {
|
|
if(SdkUtil.ttCheckSceneShowRewards()&&gameManager.get_user_is_sign()==false) {
|
|
this.reward_box.active = true
|
|
this.reward_box.active = true
|
|
- this.reward_box.getComponent(reward_box).playShake()
|
|
|
|
|
|
+ this.reward_box.getComponent(Animation).play()
|
|
let self = this
|
|
let self = this
|
|
this.reward_box.on(Node.EventType.TOUCH_END, ()=> {
|
|
this.reward_box.on(Node.EventType.TOUCH_END, ()=> {
|
|
gameManager.addTopView(config.PREFAB_PATH.reward_box_page, (node:Node)=> {
|
|
gameManager.addTopView(config.PREFAB_PATH.reward_box_page, (node:Node)=> {
|
|
@@ -98,7 +97,7 @@ export class homepage extends Component {
|
|
},500)
|
|
},500)
|
|
self.showCoinAni()
|
|
self.showCoinAni()
|
|
reward_box_page.close()
|
|
reward_box_page.close()
|
|
- this.reward_box.getComponent(reward_box).stopShake()
|
|
|
|
|
|
+ this.reward_box.getComponent(Animation).stop()
|
|
this.reward_box.active = false
|
|
this.reward_box.active = false
|
|
})
|
|
})
|
|
})
|
|
})
|