mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
@@ -9,13 +9,20 @@ import { GUI } from "../../ui/UIConfig";
|
||||
import GBattleData from "../../data/GBattleData";
|
||||
import GAttributeData from "../base/values/GAttributeData";
|
||||
import JNFrameTime from "../../../../extensions/ngame/assets/ngame/sync/frame/game/time/JNFrameTime";
|
||||
import { GAPI } from "../../consts/GAPI";
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
export interface GDungeonModeData{
|
||||
dungeonId:number, //副本Id
|
||||
dungeonItemId:number, //副本关卡Id
|
||||
data:TbGEntity.TDungeon //副本信息
|
||||
}
|
||||
|
||||
/**
|
||||
* 副本(默认) 模式
|
||||
*/
|
||||
@ccclass('GDungeonMode')
|
||||
export default class GDungeonMode extends GNormalModeBase<{},TbGEntity.TDungeon>{
|
||||
export default class GDungeonMode extends GNormalModeBase<{},GDungeonModeData>{
|
||||
|
||||
onSyncInitSuccess(){
|
||||
if(!this.data) return;
|
||||
@@ -59,14 +66,15 @@ export default class GDungeonMode extends GNormalModeBase<{},TbGEntity.TDungeon>
|
||||
}
|
||||
|
||||
onGenBoss(){
|
||||
let enemy = this.onGenRole(GNormalModePlayerEnum.ENEMY,5,TD.TbGRole.get(this.data.boss));
|
||||
enemy.onEffectiveValue(GAttributeData.TAttributeValue(this.data.attributes))
|
||||
let enemy = this.onGenRole(GNormalModePlayerEnum.ENEMY,5,TD.TbGRole.get(this.data.data.boss));
|
||||
enemy.onEffectiveValue(GAttributeData.TAttributeValue(this.data.data.attributes))
|
||||
}
|
||||
|
||||
//战斗结束
|
||||
onBattleEnd(win:GNormalModePlayerEnum){
|
||||
//结束游戏
|
||||
JNFrameTime.getInstance().setTimeout(() => {
|
||||
JNFrameTime.getInstance().setTimeout(async () => {
|
||||
await GAPI.GDungeonChallenge(this.data.dungeonId,this.data.dungeonItemId);
|
||||
this.Close();
|
||||
},3000)
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@ import { GActionType } from "./GActionType";
|
||||
|
||||
export interface ModeHookInfo{
|
||||
maps:{[key:number]:number}; //地图关卡信息 {地图Id: 地图关卡Id}
|
||||
mapStates:{[key:number]:number}; //地图关卡状态 {地图Id: 状态(0:战斗中, 1:胜利)}
|
||||
mapStates:{[key:number]:number}; //地图关卡状态 {地图Id: 战胜次数}
|
||||
}
|
||||
export interface ModeOnHookOV{
|
||||
|
||||
@@ -21,8 +21,8 @@ export const GAPI = {
|
||||
/************** 无限模式接口 ********************/
|
||||
//获取模式信息
|
||||
GOnHookInfo : async () => RData(await app.api.get(`/game/mode/onHook/info`)) as ModeOnHookOV,
|
||||
//切换游戏
|
||||
GOnHookSetMap : async (mapId) => RData(await app.api.post(`/game/mode/onHook/setMapId/${mapId}`)) as ModeOnHookOV,
|
||||
//切换地图
|
||||
GOnHookSetMap : async (mapId,saves:string[]) => RData(await app.api.post(`/game/mode/onHook/setMapId/${mapId}`,saves)) as ModeOnHookOV,
|
||||
//生成野怪
|
||||
GOnHookSpawnCreeps : async () => RProto(await app.api.get(`/game/mode/onHook/onSpawnCreeps`,{responseType:'arraybuffer'},false),GActionType.GOnHookPets) as GOnHookPets,
|
||||
//捕捉野怪
|
||||
@@ -30,8 +30,12 @@ export const GAPI = {
|
||||
//出售野怪
|
||||
GOnHookSellCreeps : async (creepId) => RData(await app.api.post(`/game/mode/onHook/onSellCreeps/${creepId}`),true) as boolean,
|
||||
//下一关
|
||||
GOnHookNextLevel : async () => RData(await app.api.post(`/game/mode/onHook/nextLevel`),true) as ModeOnHookOV,
|
||||
GOnHookNextLevel : async (saves:string[]) => RData(await app.api.post(`/game/mode/onHook/nextLevel`,saves),true) as ModeOnHookOV,
|
||||
//战胜当前关卡
|
||||
GOnHookWinLevel : async () => RData(await app.api.post(`/game/mode/onHook/winLevel`),true) as ModeOnHookOV,
|
||||
GOnHookWinLevel : async () => RData(await app.api.post(`/game/mode/onHook/winLevel`),false) as ModeOnHookOV,
|
||||
|
||||
/*************** 副本接口 ***********************/
|
||||
//消耗钥匙挑战副本
|
||||
GDungeonChallenge : async (dungeonId,dungeonItemId) => RData(await app.api.post(`/game/mode/dungeon/challenge/dungeon/${dungeonId}/${dungeonItemId}`),false) as void,
|
||||
|
||||
}
|
@@ -2,6 +2,7 @@ import { app } from "../App";
|
||||
import GBattleData, { GBattleDataInfo } from "../battle/base/values/GAttributeData";
|
||||
import { API } from "../consts/API";
|
||||
import { GAPI, ModeOnHookOV } from "../consts/GAPI";
|
||||
import GOnHookManager from "../manager/battle/mode/GOnHookManager";
|
||||
import { GUI } from "../ui/UIConfig";
|
||||
import BaseData from "./BaseData";
|
||||
|
||||
@@ -17,7 +18,7 @@ export default class GOnHookData extends BaseData{
|
||||
//是否允许下一关
|
||||
get isNextLevel(){
|
||||
if(!this.info) return false;
|
||||
return this.info.hookInfo.mapStates[this.info.onHookMap] == 1;
|
||||
return this.info.hookInfo.mapStates[this.info.onHookMap] >= 4;
|
||||
}
|
||||
|
||||
async onInit() {
|
||||
@@ -35,21 +36,25 @@ export default class GOnHookData extends BaseData{
|
||||
//切换地图
|
||||
async setMap(mapId:number){
|
||||
|
||||
this.info = await GAPI.GOnHookSetMap(mapId);
|
||||
this.info = await GAPI.GOnHookSetMap(mapId,GOnHookManager.getIns().getKillSreepsIds());
|
||||
app.layer.Open(GUI.Tips,{text:"切换地图成功"});
|
||||
|
||||
}
|
||||
|
||||
//下一关
|
||||
async onNextLevel(){
|
||||
let info = await GAPI.GOnHookNextLevel();
|
||||
if(info) this.onUpdateInfo(info);
|
||||
return !!info;
|
||||
let info = await GAPI.GOnHookNextLevel(GOnHookManager.getIns().getKillSreepsIds());
|
||||
this.onUpdateInfo(info);
|
||||
}
|
||||
|
||||
//战胜当前关卡
|
||||
async onWinLevel(){
|
||||
this.onUpdateInfo(await GAPI.GOnHookWinLevel());
|
||||
this.onUpdateInfo(await GAPI.GOnHookWinLevel())
|
||||
}
|
||||
|
||||
//返回当前进度
|
||||
getProgress(){
|
||||
return this.info.hookInfo.mapStates[this.info.onHookMap] || 0
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -52,6 +52,11 @@ export default class ResourceData extends BaseData{
|
||||
|
||||
}
|
||||
|
||||
//获取所有资源Id
|
||||
getIds():number[]{
|
||||
return Object.keys(this.data).map(id => parseInt(id));
|
||||
}
|
||||
|
||||
//获取指定资源的数量
|
||||
getValue(type:ResourceType){
|
||||
return this.data[type] || 0;
|
||||
|
@@ -52,6 +52,8 @@ export default class GOnHookManager extends Singleton{
|
||||
|
||||
//需要捕捉的宠物
|
||||
onHookCatchPets:TB.TbGRole[] = [];
|
||||
//是否自动下一关
|
||||
isAutoNext:boolean = false;
|
||||
|
||||
//是否挂机
|
||||
_isOnHook:boolean = false;
|
||||
@@ -98,8 +100,12 @@ export default class GOnHookManager extends Singleton{
|
||||
onSpawnSreeps = NGameUtil.ThrottleASync((async () => {
|
||||
let data = await GAPI.GOnHookSpawnCreeps();
|
||||
if(!data) return;
|
||||
this._sreeps = new Map();
|
||||
let ids = this.getKillSreepsIds();
|
||||
data.pets.forEach(pet => {
|
||||
this._sreeps.set(pet.key,pet as GOnHookPet);
|
||||
if(ids.indexOf(pet.key) < 0){
|
||||
this._sreeps.set(pet.key,pet as GOnHookPet);
|
||||
}
|
||||
})
|
||||
}).bind(this))
|
||||
|
||||
@@ -111,6 +117,11 @@ export default class GOnHookManager extends Singleton{
|
||||
return creeps;
|
||||
}
|
||||
|
||||
//获取已经死亡待处理的野怪Id列表
|
||||
getKillSreepsIds(){
|
||||
return this.killSreeps.map(item => item.key);
|
||||
}
|
||||
|
||||
//野怪死亡
|
||||
onKillSreeps(creeps:GOnHookPet){
|
||||
|
||||
@@ -176,6 +187,11 @@ export default class GOnHookManager extends Singleton{
|
||||
app.event.emit(GOnHookManagerEvent.RESET_DATA);
|
||||
}
|
||||
|
||||
//重置Sreeps
|
||||
onResetSreeps(){
|
||||
this._sreeps = new Map();
|
||||
}
|
||||
|
||||
//下一关
|
||||
async onNextLevel(){
|
||||
await GOnHookData.getIns().onNextLevel();
|
||||
@@ -185,6 +201,8 @@ export default class GOnHookManager extends Singleton{
|
||||
//战胜当前关卡
|
||||
async onWinLevel(){
|
||||
await GOnHookData.getIns().onWinLevel();
|
||||
//如果在自动挂机并且勾选上了自动下一关 则 自动下一关
|
||||
if(this.isOnHook && this.isAutoNext && GOnHookData.getIns().isNextLevel) this.onNextLevel();
|
||||
}
|
||||
|
||||
//切换场景
|
||||
@@ -199,8 +217,8 @@ export default class GOnHookManager extends Singleton{
|
||||
onResetMap(){
|
||||
//通知地图已切换
|
||||
app.event.emit(GOnHookManagerEvent.UPDATE_MAP);
|
||||
//重置数据
|
||||
this.onResetData();
|
||||
//重置Sreeps数据
|
||||
this.onResetSreeps();
|
||||
//重置场景
|
||||
GBattleModeManager.getIns().Open(BattleMode.OnHook,true);
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import GOnHookData from '../../../data/GOnHookData';
|
||||
import { TD } from '../../../App';
|
||||
import GOnHookData, { GOnHookDataEnum } from '../../../data/GOnHookData';
|
||||
import { app, TD } from '../../../App';
|
||||
import { Label } from 'cc';
|
||||
import { TbGEntity } from '../../../config/data/schema';
|
||||
const { ccclass, property } = _decorator;
|
||||
@@ -9,9 +9,20 @@ const { ccclass, property } = _decorator;
|
||||
export class GameDifficultyTitle extends Component {
|
||||
|
||||
@property(Label)
|
||||
title:Label;
|
||||
title:Label; //标题
|
||||
@property(Node)
|
||||
progress:Node; //进度
|
||||
|
||||
protected update(dt: number): void {
|
||||
onLoad(){
|
||||
app.event.on(GOnHookDataEnum.UPDATE,this.onUpdateView,this);
|
||||
this.onUpdateView();
|
||||
}
|
||||
|
||||
protected onDestroy(): void {
|
||||
app.event.off(GOnHookDataEnum.UPDATE,this.onUpdateView,this);
|
||||
}
|
||||
|
||||
onUpdateView(): void {
|
||||
|
||||
let info = GOnHookData.getIns().info;
|
||||
let sign = null;
|
||||
@@ -25,6 +36,12 @@ export class GameDifficultyTitle extends Component {
|
||||
|
||||
//显示难度
|
||||
this.title.string = `难度 : ${table.data.level}-${table.data.childLevel}`;
|
||||
//显示进度
|
||||
this.progress.children.forEach((item,index) => {
|
||||
if(index < GOnHookData.getIns().getProgress())
|
||||
item.active = true;
|
||||
else item.active = false;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@ import { Label } from 'cc';
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import ResourceData, { ResourceEvent, ResourceType } from '../../../data/ResourceData';
|
||||
import { Enum } from 'cc';
|
||||
import { app } from '../../../App';
|
||||
import { app, TD } from '../../../App';
|
||||
import NumberTools from '../../../tools/NumberTools';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -14,6 +14,10 @@ export class PlayerResourceShow extends Component {
|
||||
@property({type:Enum(ResourceType)})
|
||||
type:ResourceType = ResourceType.Gold;
|
||||
|
||||
//显示名称
|
||||
@property(Label)
|
||||
tig:Label;
|
||||
|
||||
//显示文本
|
||||
@property(Label)
|
||||
show:Label;
|
||||
@@ -34,6 +38,8 @@ export class PlayerResourceShow extends Component {
|
||||
//刷新
|
||||
onUpdateView(){
|
||||
|
||||
//更新名称
|
||||
this.tig && (this.tig.string = `${TD.TbGResource.get(this.type).name}:`);
|
||||
//更新资源数量
|
||||
this.show.string = `${NumberTools.NumberStr(ResourceData.getIns().getValue(this.type))}`;
|
||||
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { ResourceIcon } from '../ResourceIcon';
|
||||
import ResourceData from '../../../../data/ResourceData';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('PlayerResourceIcon')
|
||||
@@ -10,7 +11,7 @@ export class PlayerResourceIcon extends Component {
|
||||
|
||||
//设置 ( 资源Id )
|
||||
set(id:number){
|
||||
|
||||
this.icon.set(id,ResourceData.getIns().getValue(id))
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,20 @@
|
||||
import { _decorator } from 'cc';
|
||||
import JNScrollViewItem from '../../../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollViewItem';
|
||||
import { PlayerResourceIcon } from './PlayerResourceIcon';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('PlayerResourceIconScroll')
|
||||
export class PlayerResourceIconScroll extends JNScrollViewItem<number> {
|
||||
|
||||
@property(PlayerResourceIcon)
|
||||
icon:PlayerResourceIcon;
|
||||
|
||||
onInit(data:number){
|
||||
|
||||
this.icon.set(data);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "fd24051f-603b-4413-bdc2-f88ea8cd3a3e",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -0,0 +1,62 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { PlayerResourceIcon } from './PlayerResourceIcon';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('PlayerResourceIconSelect')
|
||||
export class PlayerResourceIconSelect extends Component {
|
||||
|
||||
@property(PlayerResourceIcon)
|
||||
icon:PlayerResourceIcon;
|
||||
|
||||
//选中节点
|
||||
@property(Node)
|
||||
select:Node;
|
||||
|
||||
//不可选中节点
|
||||
@property(Node)
|
||||
noselect:Node;
|
||||
|
||||
//是否被选中
|
||||
_isSelect:boolean = false;
|
||||
get isSelect(){
|
||||
return this._isSelect;
|
||||
}
|
||||
set isSelect(data:boolean){
|
||||
this._isSelect = data;
|
||||
this.onUpdateSelect();
|
||||
}
|
||||
|
||||
//是否不可选中
|
||||
_isNoSelect:boolean = false;
|
||||
get isNoSelect(){
|
||||
return this._isNoSelect;
|
||||
}
|
||||
set isNoSelect(data:boolean){
|
||||
this._isNoSelect = data;
|
||||
this.onUpdateSelect();
|
||||
}
|
||||
|
||||
onLoad(){
|
||||
this.onUpdateSelect();
|
||||
this.noselect.active = false;
|
||||
this.select.active = false;
|
||||
}
|
||||
|
||||
|
||||
//设置
|
||||
set(id:number){
|
||||
|
||||
this.icon.set(id);
|
||||
|
||||
}
|
||||
|
||||
onUpdateSelect(){
|
||||
|
||||
this.select.active = this.isSelect;
|
||||
this.noselect.active = this.isNoSelect;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "c1ae1056-03c0-4291-b34e-7f9dcd04e8de",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import JNScrollViewItem from '../../../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollViewItem';
|
||||
import { PlayerResourceIconSelect } from './PlayerResourceIconSelect';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('PlayerResourceIconSelectScroll')
|
||||
export class PlayerResourceIconSelectScroll extends JNScrollViewItem<number> {
|
||||
|
||||
@property(PlayerResourceIconSelect)
|
||||
icon:PlayerResourceIconSelect;
|
||||
|
||||
onInit(data:number){
|
||||
|
||||
this.icon.set(data);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "6ac191b2-7f6a-4990-80de-7111564e8c4f",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -5,6 +5,8 @@ import { Label } from 'cc';
|
||||
import GBattleModeManager, { BattleMode } from '../../battle/GBattleModeManager';
|
||||
import { app, TD } from '../../App';
|
||||
import { GUI } from '../UIConfig';
|
||||
import { PlayerResourceShow } from '../Consts/Resource/PlayerResourceShow';
|
||||
import ResourceData from '../../data/ResourceData';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('DungeonShowItem')
|
||||
@@ -14,8 +16,14 @@ export class DungeonShowItem extends JNScrollViewItem<TB.TbGSysDungeon> {
|
||||
@property(Label)
|
||||
title:Label;
|
||||
|
||||
//资源
|
||||
@property(PlayerResourceShow)
|
||||
resource:PlayerResourceShow;
|
||||
|
||||
onInit(){
|
||||
|
||||
this.resource.type = this.data.consume.id;
|
||||
this.resource.onUpdateView();
|
||||
this.onUpdateView();
|
||||
|
||||
}
|
||||
@@ -29,8 +37,17 @@ export class DungeonShowItem extends JNScrollViewItem<TB.TbGSysDungeon> {
|
||||
//点击副本
|
||||
onClickDungeon(){
|
||||
|
||||
GBattleModeManager.getIns().Open(BattleMode[`${this.data.type}`],true,TD[`${this.data.tigs}`].getDataList()[0].data);
|
||||
app.layer.Close(GUI.DungeonView);
|
||||
if(ResourceData.getIns().getValue(this.data.consume.id) >= this.data.consume.value){
|
||||
//打开副本
|
||||
GBattleModeManager.getIns().Open(BattleMode[`${this.data.type}`],true,{
|
||||
dungeonId:this.data.id,
|
||||
dungeonItemId:TD[`${this.data.tigs}`].getDataList()[0].id,
|
||||
data:TD[`${this.data.tigs}`].getDataList()[0].data
|
||||
});
|
||||
app.layer.Close(GUI.DungeonView);
|
||||
}else{
|
||||
app.layer.Open(GUI.Tips,{text:"没有钥匙了.."});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -83,6 +83,8 @@ export class MainView extends JNGLayerBase {
|
||||
|
||||
//点击挂机按钮
|
||||
onOpenOnHookView(){
|
||||
//取消挂机
|
||||
GOnHookManager.getIns().isOnHook = false;
|
||||
app.layer.Open(GUI.MainOnHookView);
|
||||
}
|
||||
|
||||
@@ -121,6 +123,11 @@ export class MainView extends JNGLayerBase {
|
||||
app.layer.Open(GUI.DungeonView);
|
||||
}
|
||||
|
||||
//点击打开背包
|
||||
onClickPacksack(){
|
||||
app.layer.Open(GUI.PacksackView);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -8,6 +8,7 @@ import { TablePetIconSelectScroll } from '../../Consts/Pet/table/TablePetIconSel
|
||||
import { Label } from 'cc';
|
||||
import GOnHookManager from '../../../manager/battle/mode/GOnHookManager';
|
||||
import { GUI } from '../../UIConfig';
|
||||
import { Toggle } from 'cc';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('MainOnHookView')
|
||||
@@ -20,6 +21,10 @@ export class MainOnHookView extends JNGLayerBase {
|
||||
//挂机按钮
|
||||
@property(Label)
|
||||
onHookLabel:Label;
|
||||
|
||||
//是否自动下一关
|
||||
@property(Toggle)
|
||||
toggle:Toggle;
|
||||
|
||||
onJNLoad(){
|
||||
|
||||
@@ -55,6 +60,7 @@ export class MainOnHookView extends JNGLayerBase {
|
||||
onClickOnHook(){
|
||||
GOnHookManager.getIns().onHookCatchPets = this.views.getItems<TablePetIconSelectScroll>().filter(item => item.select.isSelect).map(item => item.data)
|
||||
GOnHookManager.getIns().isOnHook = !GOnHookManager.getIns().isOnHook;
|
||||
GOnHookManager.getIns().isAutoNext = this.toggle.isChecked;
|
||||
app.layer.Open(GUI.Tips,{text:`${(GOnHookManager.getIns().isOnHook) ? "挂机" : "取消挂机"} 设置成功`})
|
||||
this.close();
|
||||
}
|
||||
|
@@ -1,17 +1,26 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import JNLayerBase from '../../../../extensions/ngame/assets/ngame/ui/base/JNLayerBase';
|
||||
import JNScrollView from '../../../../extensions/ngame/assets/ngame/util/components/scrollview/JNScrollView';
|
||||
import ResourceData from '../../data/ResourceData';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
//背包页面
|
||||
@ccclass('PacksackView')
|
||||
export class PacksackView extends JNLayerBase {
|
||||
|
||||
//背包
|
||||
@property(JNScrollView)
|
||||
views:JNScrollView;
|
||||
|
||||
onJNLoad(data?: any): void {
|
||||
super.onJNLoad(data)
|
||||
super.onJNLoad(data);
|
||||
this.onUpdateView();
|
||||
}
|
||||
|
||||
//更新页面
|
||||
onUpdateView(){
|
||||
|
||||
this.views.refreshData(ResourceData.getIns().getIds());
|
||||
|
||||
}
|
||||
|
||||
|
@@ -24,6 +24,7 @@ export enum GUI{
|
||||
IntoBattleView = "IntoBattleView", //上阵页面
|
||||
MainOnHookView = "MainOnHookView", //挂机弹窗
|
||||
MapSelectView = "MapSelectView", //地图选择页面
|
||||
PacksackView = "PacksackView", //背包页面
|
||||
|
||||
/** 副本 */
|
||||
DungeonView = "DungeonView", //副本页面
|
||||
@@ -118,6 +119,11 @@ const UIMainConfig:{ [key: string]: JNLayerInfo; } = {
|
||||
uri: "prefab/ui/地图/地图选择页面",
|
||||
anims:BackOutScale,
|
||||
},
|
||||
[GUI.PacksackView]:{
|
||||
layer:GLayer.Popup,
|
||||
uri: "prefab/ui/资源/资源背包页面",
|
||||
anims:BackOutScale,
|
||||
},
|
||||
}
|
||||
|
||||
//宠物页面
|
||||
|
Reference in New Issue
Block a user