|
@@ -1,4 +1,5 @@
|
|
|
-import { ButtonComponent, EventTouch, GraphicsComponent, instantiate, LabelComponent, loader, Node, Prefab, ProgressBarComponent, SpriteComponent, SpriteFrame, _decorator } from 'cc';
|
|
|
+import { AnimationComponent, ButtonComponent, director, EventTouch, GraphicsComponent, instantiate, LabelComponent, loader, Node, Prefab, ProgressBarComponent, SpriteComponent, SpriteFrame, _decorator } from 'cc';
|
|
|
+import { GUIManager } from '../../../engines/gui/GUIManager';
|
|
|
import { GUIMediator } from '../../../engines/gui/GUIMediator';
|
|
|
import { LoadingView } from '../../../engines/loadingView/LoadingView';
|
|
|
import { DataModelEventType } from '../../../engines/models/DataModelEventType';
|
|
@@ -7,6 +8,7 @@ import { SoundManager } from '../../../engines/sounds/SoundManager';
|
|
|
import GameConfigManager from '../../models/GameConfigManager';
|
|
|
import { GameModel } from '../../models/GameModel';
|
|
|
import { GamePropertys } from '../../models/GamePropertys';
|
|
|
+import { UIConst } from '../UIConst';
|
|
|
import { GameController } from './GameController';
|
|
|
import { WeaponBase } from './weapons/WeaponBase';
|
|
|
const { ccclass, property } = _decorator;
|
|
@@ -149,6 +151,11 @@ export class FightingMediator extends GUIMediator {
|
|
|
})
|
|
|
teachingNode:Node=null;
|
|
|
|
|
|
+ @property({
|
|
|
+ type:AnimationComponent
|
|
|
+ })
|
|
|
+ DropBoxAnimation:AnimationComponent=null;
|
|
|
+
|
|
|
/**
|
|
|
* 弹夹子弹池
|
|
|
*/
|
|
@@ -405,6 +412,13 @@ export class FightingMediator extends GUIMediator {
|
|
|
return;
|
|
|
}
|
|
|
super.update(deltaTime);
|
|
|
+ //空投
|
|
|
+ let currentTime:number=director.getCurrentTime();
|
|
|
+ if(currentTime-GameModel.single.lastDropBoxTime>30000){
|
|
|
+ this.DropBoxAnimation.node.active=true;
|
|
|
+ this.DropBoxAnimation.play("KongtouTip");
|
|
|
+ GameModel.single.lastDropBoxTime=currentTime;
|
|
|
+ }
|
|
|
if(GameController.single.fence!=null&&GameController.single.fence.node!=null){
|
|
|
this.RefreshFenceHp();
|
|
|
this.fenceHp=GameController.single.fence.hp;
|
|
@@ -483,11 +497,9 @@ export class FightingMediator extends GUIMediator {
|
|
|
* 暂停游戏
|
|
|
*/
|
|
|
pauseGame():void{
|
|
|
- if(GameController.single.paused){
|
|
|
- GameController.single.PlayGame();
|
|
|
- }else{
|
|
|
- GameController.single.PauseGame();
|
|
|
- }
|
|
|
+ GameController.single.PauseGame();
|
|
|
+ this.DropBoxAnimation.node.active=false;
|
|
|
+ GUIManager.single.Show(UIConst.DROP_BOX_UI,true);
|
|
|
}
|
|
|
|
|
|
/**
|