This commit is contained in:
PC-20230316NUNE\Administrator
2024-01-06 19:18:02 +08:00
parent 7d5ce58e5e
commit 6be5ebf5ea
35 changed files with 43174 additions and 450 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
{
"ver": "2.0.1",
"importer": "json",
"imported": true,
"uuid": "a6309190-70c9-41f7-aae2-ed94a8505b26",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,10 @@
[
{
"id": 160001,
"name": "钻石副本"
},
{
"id": 160002,
"name": "锻造石副本"
}
]

View File

@@ -0,0 +1,11 @@
{
"ver": "2.0.1",
"importer": "json",
"imported": true,
"uuid": "5bbb967f-bbcc-4ccb-b75e-b320759baf58",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "481d90a5-f5da-4ac2-8a4c-f61c20020494",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -1,5 +1,5 @@
import { _decorator, Component, director, instantiate, Node, Prefab } from 'cc';
import { app } from './App';
import { app, TD } from './App';
import { JNGame } from '../../extensions/ngame/assets/ngame/JNGame';
import { JNSyncAction } from '../../extensions/ngame/assets/ngame/sync/JNSyncAction';
import { GOnHookPets } from '../../extensions/ngame/assets/ngame/message/proto';
@@ -30,6 +30,8 @@ export class Main extends Component {
//加载 APP
await JNGame.Init(app);
console.log("TD",TD.TbGRoleEquip.getDataList())
// //发生帧同步开始
// app.socket.Send(JNSyncAction.NSyncFrameStart);

View File

@@ -702,6 +702,120 @@ export class TbBattleResource {
}
export namespace TB {
export class TbGRoleEquip {
constructor(_json_: any) {
if (_json_.id === undefined) { throw new Error() }
this.id = _json_.id
if (_json_.name === undefined) { throw new Error() }
this.name = _json_.name
if (_json_.type === undefined) { throw new Error() }
this.type = _json_.type
if (_json_.quality === undefined) { throw new Error() }
this.quality = _json_.quality
if (_json_.icon === undefined) { throw new Error() }
this.icon = _json_.icon
if (_json_.levelFactors === undefined) { throw new Error() }
{ this.levelFactors = []; for(let _ele of _json_.levelFactors) { let _e; _e = _ele; this.levelFactors.push(_e);}}
if (_json_.baseAttributes === undefined) { throw new Error() }
{ this.baseAttributes = []; for(let _ele of _json_.baseAttributes) { let _e; { _e = []; for(let _ele of _ele) { let _e; _e = new TbGEntity.TAttributeValue(_ele); _e.push(_e);}}; this.baseAttributes.push(_e);}}
}
/**
* id
*/
readonly id: number
/**
* 装备名称
*/
readonly name: string
/**
* 装备类别(1=武器/2=帽子/3=项链/4=护肩/5=衣服/6=腰带/7=手套/8=戒指/9=裤子/10=鞋子)
*/
readonly type: number
/**
* 品质信息
*/
readonly quality: number
/**
* 图片
*/
readonly icon: string
/**
* 等级系数 (属性 * (等级 * 系数))
*/
readonly levelFactors: number[]
/**
* 基础属性(value - value 区间)
*/
readonly baseAttributes: TbGEntity.TAttributeValue[][]
resolve(tables:Tables)
{
}
}
}
export namespace TbGEntity {
/**
* 属性
*/
export class TAttributeValue {
constructor(_json_: any) {
if (_json_.id === undefined) { throw new Error() }
this.id = _json_.id
if (_json_.value === undefined) { throw new Error() }
this.value = _json_.value
}
/**
* 属性Id
*/
readonly id: number
/**
* 属性值
*/
readonly value: number
resolve(tables:Tables)
{
}
}
}
export namespace TB {
export class TbGSysFuben {
constructor(_json_: any) {
if (_json_.id === undefined) { throw new Error() }
this.id = _json_.id
if (_json_.name === undefined) { throw new Error() }
this.name = _json_.name
}
/**
* id
*/
readonly id: number
/**
* 副本名称
*/
readonly name: string
resolve(tables:Tables)
{
}
}
}
export class TbGGlobal{
@@ -1216,6 +1330,70 @@ export class TbBattleResource{
export class TbGRoleEquip{
private _dataMap: Map<number, TB.TbGRoleEquip>
private _dataList: TB.TbGRoleEquip[]
constructor(_json_: any) {
this._dataMap = new Map<number, TB.TbGRoleEquip>()
this._dataList = []
for(var _json2_ of _json_) {
let _v: TB.TbGRoleEquip
_v = new TB.TbGRoleEquip(_json2_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, TB.TbGRoleEquip> { return this._dataMap; }
getDataList(): TB.TbGRoleEquip[] { return this._dataList; }
get(key: number): TB.TbGRoleEquip | undefined { return this._dataMap.get(key); }
resolve(tables:Tables)
{
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbGSysFuben{
private _dataMap: Map<number, TB.TbGSysFuben>
private _dataList: TB.TbGSysFuben[]
constructor(_json_: any) {
this._dataMap = new Map<number, TB.TbGSysFuben>()
this._dataList = []
for(var _json2_ of _json_) {
let _v: TB.TbGSysFuben
_v = new TB.TbGSysFuben(_json2_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, TB.TbGSysFuben> { return this._dataMap; }
getDataList(): TB.TbGSysFuben[] { return this._dataList; }
get(key: number): TB.TbGSysFuben | undefined { return this._dataMap.get(key); }
resolve(tables:Tables)
{
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
type JsonLoader = (file: string) => any
export class Tables {
@@ -1251,6 +1429,10 @@ export class Tables {
get TbGOnHookMap120001(): TbGOnHookMap120001 { return this._TbGOnHookMap120001;}
private _TbBattleResource: TbBattleResource
get TbBattleResource(): TbBattleResource { return this._TbBattleResource;}
private _TbGRoleEquip: TbGRoleEquip
get TbGRoleEquip(): TbGRoleEquip { return this._TbGRoleEquip;}
private _TbGSysFuben: TbGSysFuben
get TbGSysFuben(): TbGSysFuben { return this._TbGSysFuben;}
constructor(loader: JsonLoader) {
this._TbGGlobal = new TbGGlobal(loader('tbgglobal'))
@@ -1269,6 +1451,8 @@ export class Tables {
this._TbGOnHookMaps = new TbGOnHookMaps(loader('tbgonhookmaps'))
this._TbGOnHookMap120001 = new TbGOnHookMap120001(loader('tbgonhookmap120001'))
this._TbBattleResource = new TbBattleResource(loader('tbbattleresource'))
this._TbGRoleEquip = new TbGRoleEquip(loader('tbgroleequip'))
this._TbGSysFuben = new TbGSysFuben(loader('tbgsysfuben'))
this._TbGGlobal.resolve(this)
this._TbGRole.resolve(this)
@@ -1286,5 +1470,7 @@ export class Tables {
this._TbGOnHookMaps.resolve(this)
this._TbGOnHookMap120001.resolve(this)
this._TbBattleResource.resolve(this)
this._TbGRoleEquip.resolve(this)
this._TbGSysFuben.resolve(this)
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "a8470a11-8808-408c-bdf6-c2957fc3faf2",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,57 @@
import { _decorator, Component, Node } from 'cc';
import { JNPageView } from '../../../../../extensions/ngame/assets/ngame/util/components/pageview/JNPageView';
import { Button } from 'cc';
import { tween } from 'cc';
import { Widget } from 'cc';
import { UITransform } from 'cc';
const { ccclass, property } = _decorator;
@ccclass('MainControl')
export class MainControl extends Component {
@property(Button)
leftButton:Button;
@property(Button)
rightButton:Button;
onLoad(){
this.onUpdateView();
}
onUpdateView(){
let pageIndex = this.getComponent(JNPageView).getCurrentPageIndex() - 1;
if(pageIndex){
tween(this.leftButton.getComponent(Widget))
.to(.3,{left:-this.leftButton.getComponent(UITransform).width})
.start();
tween(this.rightButton.getComponent(Widget))
.to(.3,{right:0})
.start();
}else{
tween(this.leftButton.getComponent(Widget))
.to(.3,{left:0})
.start();
tween(this.rightButton.getComponent(Widget))
.to(.3,{right:-this.rightButton.getComponent(UITransform).width})
.start();
}
}
//下一页
onClickRight(){
this.getComponent(JNPageView).setCurrentPageIndex(1);
this.onUpdateView();
}
//上一页
onClickLeft(){
this.getComponent(JNPageView).setCurrentPageIndex(0);
this.onUpdateView();
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "00caacaa-5016-4f56-8ff0-a6ebeb991e96",
"files": [],
"subMetas": {},
"userData": {}
}