配置全部转移luban

This commit is contained in:
2025-08-12 16:58:02 +08:00
parent 75cc583a44
commit 83370bd0ef
47 changed files with 423 additions and 4340 deletions
+6 -64
View File
@@ -1,65 +1,7 @@
export namespace Config18x
{
export enum PriceType
{
Free = 'free',
Try = 'try',
Coin = 'coin',
}
export enum ImageState
{
Release,
Lock,
UnKnown
}
export enum PicType
{
RemoteUrlImage,
RemoteUrlGif,
LocalGif,
LocalImage
}
export enum Category
{
shunv = 1001,
lama = 1002
}
export namespace Config18x {
export enum ImageState {
Release,
Lock,
UnKnown,
}
}
export interface PicInfo
{
picType: Config18x.PicType;
url: string;
imageState: Config18x.ImageState;
}
export interface Theme
{
themeId:number;
name:string;
isRelease:boolean;
pic:PicInfo;
}
export interface GirlInfo
{
id:number;
name:string;
age:number;
category:Config18x.Category;
tag:string[];
priceType:Config18x.PriceType;
pic:PicInfo;
starCount:number;
}
export interface GirlDetailInfo
{
baseInfo:GirlInfo;
detailDesc:string;
pics:PicInfo[];
}
@@ -1,144 +0,0 @@
import {Config18x, GirlDetailInfo, GirlInfo, Theme} from "db://assets/Scripts/Main/Config/Config18x";
import Category = Config18x.Category;
import PicType = Config18x.PicType;
import ImageState = Config18x.ImageState;
export interface Character {
id: number;
name: string;
age: number;
description: string;
}
export const GirlsData: GirlInfo[] =
[
{
id: 10001,
name: "Anaya Kapoor",
age: 29,
category: Category.shunv,
tag: ["Hot", "Horny"],
priceType: Config18x.PriceType.Free,
pic: {picType: PicType.LocalImage, url: "Image/Girls/10001/Avatar/10001_avatar", imageState: ImageState.Release},
starCount: 5
},
{
id: 10002,
name: "Meher Joshi",
age: 26,
category: Category.shunv,
tag: ["Earth-tone linens", "handcrafted jewelry"],
priceType: Config18x.PriceType.Try,
pic: {picType: PicType.LocalImage, url: "Image/Girls/10002/Avatar/10002_avatar", imageState: ImageState.Release},
starCount: 4
},
{
id: 10003,
name: "Sana Reddy",
age: 29,
category: Category.shunv,
tag: [" Singer-Songwriter", "Dancer"],
priceType: Config18x.PriceType.Coin,
pic: {picType: PicType.LocalImage, url: "Image/Girls/10003/Avatar/10003_avatar", imageState: ImageState.Release},
starCount: 3
}
]
export const girlDetailInfo:GirlDetailInfo[] = [
{
baseInfo:GirlsData[0],
detailDesc:"🌸 Hi, I'm Anaya Kapoor, a 24-year-old dreamer from Mumbai. I blend tradition with trend — from vibrant saris to sleek streetwear, fashion is how I express my story.\n" +
"Coffee lover ☕ | Dancer 💃 | Proud Desi ✨\n" +
"Be your own kind of beautiful.",
pics:[
{picType:PicType.LocalGif,url:"Image/Girls/10001/DescImg/10001_video",imageState:ImageState.Release},
{picType:PicType.LocalImage,url:"Image/Girls/10001/DetailImg/10001_1",imageState:ImageState.Release},
{picType:PicType.LocalImage,url:"Image/Girls/10001/DetailImg/10001_2",imageState:ImageState.Lock},
{picType:PicType.LocalImage,url:"Image/Girls/10001/DetailImg/10001_3",imageState:ImageState.UnKnown}
]
},
{
baseInfo:GirlsData[1],
detailDesc:"Im Meher Joshi, a 26-year-old architect passionate about green " +
"design and timeless spaces. Whether Im sketching under a banyan tree or supervising a modern villa in Goa," +
" I find inspiration in nature and culture.",
pics:[{picType:PicType.LocalGif,url:"Image/Girls/10002/DescImg/10002_chatBg",imageState:ImageState.Release},
{picType:PicType.LocalImage,url:"Image/Girls/10002/DetailImg/10002_1",imageState:ImageState.Release},
{picType:PicType.LocalImage,url:"Image/Girls/10002/DetailImg/10002_2",imageState:ImageState.Release},
{picType:PicType.LocalImage,url:"Image/Girls/10002/DetailImg/10002_3",imageState:ImageState.Release}]
},
{
baseInfo:GirlsData[2],
detailDesc:"I'm Sana Reddy, Indias rising pop rebel. I sing in Telugu, " +
"Hindi, and English — because music has no language, just energy. " +
"Off stage, Im chill and goofy. On stage? Im a storm.",
pics:[{picType:PicType.LocalGif,url:"Image/Girls/10003/DescImg/10003_chatBg",imageState:ImageState.Release},
{picType:PicType.LocalImage,url:"Image/Girls/10003/DetailImg/10003_1",imageState:ImageState.Release},
{picType:PicType.LocalImage,url:"Image/Girls/10003/DetailImg/10003_2",imageState:ImageState.Release},
{picType:PicType.LocalImage,url:"Image/Girls/10003/DetailImg/10003_3",imageState:ImageState.Release}]
},
]
export const themes: Theme[] = [
{
themeId: 1001,
name: "熟女",
isRelease: true,
pic: {
picType: PicType.LocalImage,
imageState: ImageState.Release,
url: "Image/Theme/1001"
}
},
{
themeId: 1002,
name: "18岁",
isRelease: false,
pic: {
picType: PicType.LocalImage,
imageState: ImageState.Lock,
url: "Image/Theme/1002"
}
},
{
themeId: 1003,
name: "辣妈",
isRelease: false,
pic: {
picType: PicType.LocalImage,
imageState: ImageState.Lock,
url: "Image/Theme/1003"
}
},
{
themeId: 1004,
name: "捆绑",
isRelease: false,
pic: {
picType: PicType.LocalImage,
imageState: ImageState.Lock,
url: "Image/Theme/1004"
}
},
{
themeId: 1005,
name: "公众野战",
isRelease: false,
pic: {
picType: PicType.LocalImage,
imageState: ImageState.Lock,
url: "Image/Theme/1005"
}
},
{
themeId: 1006,
name: "卡通",
isRelease: false,
pic: {
picType: PicType.LocalImage,
imageState: ImageState.Lock,
url: "Image/Theme/1006"
}
}
]
@@ -1,9 +0,0 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "5a025fba-6622-4b6d-9706-b09123b7c2ce",
"files": [],
"subMetas": {},
"userData": {}
}
@@ -18,12 +18,10 @@ import { ChatContentsLayout } from "../components/ChatContentsLayout";
import { ViewManager } from "db://assets/Scripts/Main/Manager/ViewManager";
import GameRootUI from "db://assets/Scripts/Main/Common/GameRootUI";
import { ImagePopup } from "../components/ImagePopup";
import {
girlDetailInfo,
GirlsData,
} from "db://assets/Scripts/Main/Config/cfg/characters";
import ResManager from "db://assets/Scripts/Main/Manager/ResManager";
import { VideoRoleType } from "db://assets/Scripts/Main/Common/GlobalValue";
import ConfigManager from "../../manager/ConfigManager";
const { ccclass, property } = _decorator;
@ccclass("ChatPanel")
@@ -69,12 +67,13 @@ export class ChatPanel extends li_BaseView {
}
refresh(id: number) {
this.id = id;
const data = girlDetailInfo.filter((value) => value.baseInfo.id == id)[0];
const data = ConfigManager.tables.TbGirls.get(this.id);
const dataDetail = ConfigManager.tables.TbGirlsDetail.get(this.id);
if (!data) return;
this.girlName.string = data.baseInfo.name;
this.girlName.string = data.name;
ResManager.I.changeBundleSpriteFrame(
this.girlImg,
data.baseInfo.pic.url,
data.avatarPath,
"Chat18x",
() => {
let sizeTran = this.girlImg.node.parent.getComponent(UITransform);
@@ -89,7 +88,7 @@ export class ChatPanel extends li_BaseView {
this._nodeTab.BgFrame.getComponent(UITransform);
Utils.sendInnerMsg(InnerMsgCode.SimplePlayVide, {
path: data.pics[0].url,
path: dataDetail.pics[0],
size: uiTransform.contentSize,
});
}
@@ -1,67 +1,60 @@
import {_decorator, Component, math, Node, Sprite} from 'cc';
import {Config18x, PicInfo} from "db://assets/Scripts/Main/Config/Config18x";
import { _decorator, Component, math, Node, Sprite } from "cc";
import { Config18x } from "db://assets/Scripts/Main/Config/Config18x";
import ResManager from "db://assets/Scripts/Main/Manager/ResManager";
import PicType = Config18x.PicType;
import ImageState = Config18x.ImageState;
import {ViewManager} from "db://assets/Scripts/Main/Manager/ViewManager";
import {GButton} from "db://assets/Scripts/Main/Common/GButton";
import {GirlDetailPanel} from "./GirlDetailPanel";
import { ViewManager } from "db://assets/Scripts/Main/Manager/ViewManager";
import { GButton } from "db://assets/Scripts/Main/Common/GButton";
import { GirlDetailPanel } from "./GirlDetailPanel";
const {ccclass, property} = _decorator;
const { ccclass, property } = _decorator;
@ccclass('DetailImageItem')
@ccclass("DetailImageItem")
export class DetailImageItem extends Component {
@property(Sprite)
img: Sprite;
@property(Sprite)
img: Sprite;
@property(Node)
lock: Node;
@property(Node)
question: Node;
@property(Node)
lock: Node;
@property(Node)
question: Node;
base:GirlDetailPanel;
url:string;
base: GirlDetailPanel;
url: string;
onLoad()
{
GButton.BandClick(this.node,this.onClickThis,this);
onLoad() {
GButton.BandClick(this.node, this.onClickThis, this);
}
onClickThis() {
let data = {
url: this.url,
closeFunc: () => {
this.base.setVideEnable(true);
},
};
if (this.url) {
ViewManager.I.openBundlesView("ShowPanel", data);
this.base.setVideEnable(false);
}
}
refresh(path: string, base: GirlDetailPanel) {
this.base = base;
this.lock.active = false;
this.question.active = false;
onClickThis()
{
let data = {url:this.url,closeFunc:()=>{
this.base.setVideEnable(true);
}
}
if(this.url){
ViewManager.I.openBundlesView('ShowPanel',data);
this.base.setVideEnable(false);
}
}
refresh(info: PicInfo,base:GirlDetailPanel) {
this.base = base;
this.lock.active = info.imageState === ImageState.Lock;
this.question.active = info.imageState === ImageState.UnKnown
if (info.picType == PicType.LocalImage) {
this.url = info.url;
if (info.imageState !== ImageState.Release) {
this.url += '_blured';
if (info.imageState === ImageState.Lock)
this.img.color = new math.Color(127, 127, 127, 255);
else
this.img.color = new math.Color(50, 50, 50, 255);
} else {
this.img.color = new math.Color(255, 255, 255, 255);
}
ResManager.I.changeBundleSpriteFrame(this.img, this.url, "Chat18x");
}
if (true) {
this.url = path;
// if (info.imageState !== ImageState.Release) {
// this.url += '_blured';
// if (info.imageState === ImageState.Lock)
// this.img.color = new math.Color(127, 127, 127, 255);
// else
// this.img.color = new math.Color(50, 50, 50, 255);
// } else {
// this.img.color = new math.Color(255, 255, 255, 255);
// }
ResManager.I.changeBundleSpriteFrame(this.img, this.url, "Chat18x");
}
}
}
@@ -1,13 +1,9 @@
import {_decorator, Label, Node, Sprite, VideoPlayer,instantiate} from "cc";
import { _decorator, Label, Node, Sprite, VideoPlayer, instantiate } from "cc";
import li_BaseView from "db://assets/Scripts/Main/Common/li_BaseView";
import {girlDetailInfo} from "db://assets/Scripts/Main/Config/cfg/characters";
import {Config18x} from "db://assets/Scripts/Main/Config/Config18x";
import PicType = Config18x.PicType;
import ResManager from "db://assets/Scripts/Main/Manager/ResManager";
import Utils from "db://assets/Scripts/Main/Common/Utils";
import { DetailImageItem } from "./DetailImageItem";
import { NavigationManager } from "../../manager/NavigationManager";
import ConfigManager from "../../manager/ConfigManager";
const { ccclass, property } = _decorator;
@@ -38,79 +34,77 @@ export class GirlDetailPanel extends li_BaseView {
id = 0;
@property(DetailImageItem)
imgItemInst:DetailImageItem;
imgItemInst: DetailImageItem;
@property(Node)
imgsLayout:Node;
imgsLayout: Node;
openUIDataCT(data)
{
openUIDataCT(data) {
this.id = data;
}
onLoadCT() {
super.onLoadCT();
this.imgItemInst.node.active =false;
this.imgItemInst.node.active = false;
this.refresh(this.id);
}
setVideEnable(enable:boolean) {
setVideEnable(enable: boolean) {
this.avatarVideo.enabled = enable;
if(enable)
{
if (enable) {
this.avatarVideo.play();
}
}
refresh(index:number)
{
refresh(index: number) {
console.log(index);
const data = girlDetailInfo.find(v=>v.baseInfo.id === index);
this.girlName.string=this.descName.string = data.baseInfo.name;
const dataDetail = ConfigManager.tables.TbGirlsDetail.get(this.id);
const data = ConfigManager.tables.TbGirls.get(this.id);
this.girlName.string = this.descName.string = data.name;
if(data.pics[0].picType == PicType.LocalGif)
{
ResManager.I.changeBundleVideo(this.avatarVideo,data.pics[0].url,"Chat18x");
if (dataDetail.pics[0].endsWith("video")) {
ResManager.I.changeBundleVideo(
this.avatarVideo,
dataDetail.pics[0],
"Chat18x"
);
}
if(data.pics.length>1)
{
for (let i = this.imgsLayout.children.length-1; i >=0 ; i--) {
if (dataDetail.pics.length > 1) {
for (let i = this.imgsLayout.children.length - 1; i >= 0; i--) {
this.imgsLayout.children[i].destroy();
}
for (let i = 1; i < data.pics.length; i++) {
const cfg = data.pics[i];
let newNode = instantiate(this.imgItemInst.node)
for (let i = 1; i < dataDetail.pics.length; i++) {
const path = dataDetail.pics[i];
let newNode = instantiate(this.imgItemInst.node);
let item = newNode.getComponent(DetailImageItem);
item.refresh(cfg,this);
item.refresh(path, this);
newNode.active = true;
this.imgsLayout.addChild(newNode);
}
}
this.desc.string = data.detailDesc;
let desc = '';
for (let i = 0; i < data.baseInfo.tag.length; i++) {
if(i!=0) desc += "\n"
desc += data.baseInfo.tag[i];
this.desc.string = dataDetail.detailDesc;
let desc = "";
for (let i = 0; i < data.tag.length; i++) {
if (i != 0) desc += "\n";
desc += data.tag[i];
}
this.tags.string = desc;
for (let i = 0; i <5; i++) {
this.starParent.children[i].active =(i<data.baseInfo.starCount);
for (let i = 0; i < 5; i++) {
this.starParent.children[i].active = i < data.starCount;
}
this.descAge.string = data.baseInfo.age.toString();
this.desc.string = data.detailDesc;
this.descAge.string = data.age.toString();
this.desc.string = dataDetail.detailDesc;
this.id = data.baseInfo.id;
this.id = data.id;
}
OnClickChatBtn() {
NavigationManager.Instance.navigateToChat(this.id);
this.onClose();
}
returnBtn()
{
returnBtn() {
this.onClose();
NavigationManager.Instance.navigateToGirlList(1001);
//ViewManager.I.openBundlesView("GirlListPanel");
@@ -1,10 +1,10 @@
import { _decorator, Component, Label, Node, Sprite, UITransform } from "cc";
import { Config18x, GirlInfo } from "db://assets/Scripts/Main/Config/Config18x";
import PriceType = Config18x.PriceType;
import { Config18x } from "db://assets/Scripts/Main/Config/Config18x";
import { ViewManager } from "db://assets/Scripts/Main/Manager/ViewManager";
import ResManager from "db://assets/Scripts/Main/Manager/ResManager";
import Utils from "db://assets/Scripts/Main/Common/Utils";
import { NavigationManager } from "../../manager/NavigationManager";
import { Girl, PriceType } from "../../../schema/schema";
const { ccclass, property } = _decorator;
@@ -30,7 +30,7 @@ export class GirlListItem extends Component {
id: number = -1;
baseNode: Node;
refreshData(data: GirlInfo, baseNode: Node) {
refreshData(data: Girl, baseNode: Node) {
this.baseNode = baseNode;
this.id = data.id;
this.girlName.string = data.name;
@@ -40,13 +40,13 @@ export class GirlListItem extends Component {
desc += data.tag[i];
}
this.tags.string = desc;
this.price.node.active = data.priceType == PriceType.Coin;
this.freeNode.active = data.priceType == PriceType.Free;
this.tryNode.active = data.priceType == PriceType.Try;
this.price.node.active = data.priceType == PriceType.pay;
this.freeNode.active = data.priceType == PriceType.free;
this.tryNode.active = data.priceType == PriceType.first_time_free;
ResManager.I.changeBundleSpriteFrame(
this.avatar,
data.pic.url,
data.avatarPath,
"Chat18x",
() => {
let sizeTran = this.avatar.node.parent.getComponent(UITransform);
@@ -1,9 +1,9 @@
import { _decorator, Component, Node, instantiate } from "cc";
import li_BaseView from "db://assets/Scripts/Main/Common/li_BaseView";
import Utils from "db://assets/Scripts/Main/Common/Utils";
import { GirlsData } from "db://assets/Scripts/Main/Config/cfg/characters";
import { GButton } from "db://assets/Scripts/Main/Common/GButton";
import { GirlListItem } from "./GirlListItem";
import ConfigManager from "../../manager/ConfigManager";
const { ccclass, property } = _decorator;
@ccclass("GirlListPanel")
@@ -15,9 +15,9 @@ export class GirlListPanel extends li_BaseView {
cache: GirlListItem[] = [];
id: number;
category: number;
openUIDataCT(data) {
this.id = data;
this.category = data;
}
onLoadCT() {
Utils.parseNode(this.node, this._nodeTab);
@@ -25,16 +25,17 @@ export class GirlListPanel extends li_BaseView {
this.itemInst = this._nodeTab.BubbleItem.getComponent(GirlListItem);
this.itemInst.node.active = false;
this.content = this._nodeTab.content;
this.refresh(this.id);
this.refresh(this.category);
}
refresh(index: number) {
refresh(category: number) {
if (this.cache) {
for (let i = this.cache.length - 1; i >= 0; i--) {
this.cache[i].node.destroy();
}
}
const config = GirlsData.filter((value) => value.category == index);
const GirlsData = ConfigManager.tables.TbGirls.getDataList();
const config = GirlsData.filter((value) => value.category == category);
for (let i = 0; i < config.length; i++) {
const cfg = config[i];
let newNode = instantiate(this.itemInst.node);
@@ -1,9 +1,9 @@
import { _decorator, Component, Label, Node, Sprite, UITransform } from "cc";
import { Theme } from "db://assets/Scripts/Main/Config/Config18x";
import { GButton } from "db://assets/Scripts/Main/Common/GButton";
import ResManager from "db://assets/Scripts/Main/Manager/ResManager";
import Utils from "db://assets/Scripts/Main/Common/Utils";
import { NavigationManager } from "../../manager/NavigationManager";
import { TbThemes, Theme } from "../../../schema/schema";
const { ccclass, property } = _decorator;
@ccclass("ThemeItem")
@@ -16,7 +16,7 @@ export class ThemeItem extends Component {
@property(Sprite)
img: Sprite;
private id: number;
private category: number;
private isLocked: boolean;
start() {}
@@ -24,10 +24,10 @@ export class ThemeItem extends Component {
this.lockImg.node.active = !themeData.isRelease;
this.isLocked = !themeData.isRelease;
this.titleName.string = themeData.name;
this.id = themeData.themeId;
this.category = themeData.category;
ResManager.I.changeBundleSpriteFrame(
this.img,
themeData.pic.url,
themeData.path,
"Chat18x",
() => {
let sizeTran = this.img.node.parent.getComponent(UITransform);
@@ -41,6 +41,6 @@ export class ThemeItem extends Component {
if (this.isLocked) {
return;
}
NavigationManager.Instance.navigateToGirlList(this.id);
NavigationManager.Instance.navigateToGirlList(this.category);
}
}
@@ -9,15 +9,12 @@ import {
} from "cc";
import li_BaseView from "db://assets/Scripts/Main/Common/li_BaseView";
import Utils from "db://assets/Scripts/Main/Common/Utils";
import {
GirlsData,
themes,
} from "db://assets/Scripts/Main/Config/cfg/characters";
import { GButton } from "db://assets/Scripts/Main/Common/GButton";
import ResManager from "db://assets/Scripts/Main/Manager/ResManager";
import { ThemeItem } from "./ThemeItem";
import { NavigationManager } from "../../manager/NavigationManager";
import { GirlListItem } from "./GirlListItem";
import ConfigManager from "../../manager/ConfigManager";
const { ccclass, property } = _decorator;
@@ -59,9 +56,10 @@ export class ThemePanel extends li_BaseView {
this.cache[i].node.destroy();
}
}
const config = themes;
for (let i = 0; i < config.length; i++) {
const cfg = config[i];
const cfgs = ConfigManager.tables.TbThemes.getDataList();
for (let i = 0; i < cfgs.length; i++) {
const cfg = cfgs[i];
if (!cfg) return;
let newNode = instantiate(this.itemInst.node);
let item = newNode.getComponent(ThemeItem);
item.refresh(cfg);
@@ -70,12 +68,12 @@ export class ThemePanel extends li_BaseView {
this.content.addChild(newNode);
}
const rectInfo = GirlsData[0];
const rectInfo = cfgs[0];
this.recId = rectInfo.id;
this.recName.string = rectInfo.name;
ResManager.I.changeBundleSpriteFrame(
this.recSprite,
rectInfo.pic.url,
rectInfo.path,
"Chat18x",
() => {
let sizeTran = this.recSprite.node.parent.getComponent(UITransform);
+173 -9
View File
@@ -137,7 +137,7 @@ export class Reward {
export class Girls {
export class Girl {
constructor(_buf_: ByteBuf) {
this.id = _buf_.readInt()
@@ -146,6 +146,8 @@ export class Girls {
this.category = _buf_.readInt()
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.tag = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readString(); this.tag.push(_e0);}}
this.priceType = _buf_.readInt()
this.avatarPath = _buf_.readString()
this.starCount = _buf_.readInt()
}
/**
@@ -172,6 +174,14 @@ export class Girls {
* 付费类型
*/
readonly priceType: PriceType
/**
* 头像路径
*/
readonly avatarPath: string
/**
* 评价星数
*/
readonly starCount: number
resolve(tables:Tables) {
@@ -180,6 +190,84 @@ export class Girls {
}
}
export class GirlDetail {
constructor(_buf_: ByteBuf) {
this.id = _buf_.readInt()
this.detailDesc = _buf_.readString()
{ let n = Math.min(_buf_.readSize(), _buf_.size); this.pics = []; for(let i = 0 ; i < n ; i++) { let _e0 ;_e0 = _buf_.readString(); this.pics.push(_e0);}}
}
/**
* id
*/
readonly id: number
/**
* 自我介绍
*/
readonly detailDesc: string
/**
* 资源列表
*/
readonly pics: string[]
resolve(tables:Tables) {
}
}
export class Theme {
constructor(_buf_: ByteBuf) {
this.id = _buf_.readInt()
this.name = _buf_.readString()
this.category = _buf_.readInt()
this.isRelease = _buf_.readBool()
this.path = _buf_.readString()
}
/**
* id
*/
readonly id: number
/**
* 主题名称
*/
readonly name: string
/**
* 主题枚举
*/
readonly category: Category
/**
* 是否解锁
*/
readonly isRelease: boolean
/**
* 图片路径
*/
readonly path: string
resolve(tables:Tables) {
}
}
@@ -291,23 +379,89 @@ export class TbReward {
export class TbGirls {
private _dataMap: Map<number, Girls>
private _dataList: Girls[]
private _dataMap: Map<number, Girl>
private _dataList: Girl[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map<number, Girls>()
this._dataMap = new Map<number, Girl>()
this._dataList = []
for(let n = _buf_.readInt(); n > 0; n--) {
let _v: Girls
_v = new Girls(_buf_)
let _v: Girl
_v = new Girl(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, Girls> { return this._dataMap; }
getDataList(): Girls[] { return this._dataList; }
getDataMap(): Map<number, Girl> { return this._dataMap; }
getDataList(): Girl[] { return this._dataList; }
get(key: number): Girls | undefined {
get(key: number): Girl | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbGirlsDetail {
private _dataMap: Map<number, GirlDetail>
private _dataList: GirlDetail[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map<number, GirlDetail>()
this._dataList = []
for(let n = _buf_.readInt(); n > 0; n--) {
let _v: GirlDetail
_v = new GirlDetail(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, GirlDetail> { return this._dataMap; }
getDataList(): GirlDetail[] { return this._dataList; }
get(key: number): GirlDetail | undefined {
return this._dataMap.get(key);
}
resolve(tables:Tables) {
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbThemes {
private _dataMap: Map<number, Theme>
private _dataList: Theme[]
constructor(_buf_: ByteBuf) {
this._dataMap = new Map<number, Theme>()
this._dataList = []
for(let n = _buf_.readInt(); n > 0; n--) {
let _v: Theme
_v = new Theme(_buf_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, Theme> { return this._dataMap; }
getDataList(): Theme[] { return this._dataList; }
get(key: number): Theme | undefined {
return this._dataMap.get(key);
}
@@ -363,6 +517,10 @@ export class Tables {
get TbReward(): demo.TbReward { return this._TbReward;}
private _TbGirls: TbGirls
get TbGirls(): TbGirls { return this._TbGirls;}
private _TbGirlsDetail: TbGirlsDetail
get TbGirlsDetail(): TbGirlsDetail { return this._TbGirlsDetail;}
private _TbThemes: TbThemes
get TbThemes(): TbThemes { return this._TbThemes;}
private _Tbitem: demo.Tbitem
get Tbitem(): demo.Tbitem { return this._Tbitem;}
@@ -370,6 +528,8 @@ export class Tables {
let names: string[] = [];
names.push('demo_tbreward');
names.push('tbgirls');
names.push('tbgirlsdetail');
names.push('tbthemes');
names.push('demo_tbitem');
return names;
}
@@ -377,10 +537,14 @@ export class Tables {
constructor(loader: ByteBufLoader) {
this._TbReward = new demo.TbReward(loader('demo_tbreward'))
this._TbGirls = new TbGirls(loader('tbgirls'))
this._TbGirlsDetail = new TbGirlsDetail(loader('tbgirlsdetail'))
this._TbThemes = new TbThemes(loader('tbthemes'))
this._Tbitem = new demo.Tbitem(loader('demo_tbitem'))
this._TbReward.resolve(this)
this._TbGirls.resolve(this)
this._TbGirlsDetail.resolve(this)
this._TbThemes.resolve(this)
this._Tbitem.resolve(this)
}
}