Chat相关表现&逻辑分离,新增ChatController
新增情绪机器人逻辑, 新增情绪切换视频逻辑
This commit is contained in:
@@ -16,7 +16,7 @@ import LanguageUtils from "../../../Main/Common/LanguageUtils";
|
||||
import Utils from "../../../Main/Common/Utils";
|
||||
import { InnerMsgCode } from "../../../Main/Config/InnerMsgCode";
|
||||
import { SimpleToggle } from "../components/SimpleToggle";
|
||||
import { GirlDetail } from "../../../schema/schema";
|
||||
import { GirlDetail, purchase } from "../../../schema/schema";
|
||||
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@@ -151,31 +151,37 @@ export class GirlDetailPanel extends li_BaseView {
|
||||
}
|
||||
this.tags.string = desc;
|
||||
for (let i = 0; i < 5; i++) {
|
||||
this.starParent.children[i].active = i < data.starCount;
|
||||
this.starParent.children[i].active = i < 5;
|
||||
}
|
||||
this.descAge.string = data.age.toString();
|
||||
this.descAge.string =
|
||||
LanguageUtils.getText("girldetailpanel.age") + data.age.toString();
|
||||
this.desc.string = dataDetail.detailDesc;
|
||||
|
||||
ResManager.I.changeBundleVideo(
|
||||
this.avatarVideo,
|
||||
dataDetail.vids[0],
|
||||
dataDetail.commercialVideos[0].path,
|
||||
"Chat18x"
|
||||
);
|
||||
|
||||
// 也立即尝试调整(以防已经加载完成)
|
||||
this.adjustVideoScale();
|
||||
this.vids = dataDetail.vids.slice(0);
|
||||
this.refreshImgs(dataDetail.pics, true);
|
||||
this.vids = dataDetail.commercialVideos.slice(0);
|
||||
const paths = dataDetail.commercialImages.map((a) => a.path);
|
||||
this.refreshImgs(paths, true);
|
||||
}
|
||||
|
||||
vids: string[];
|
||||
vids: purchase.CommercialVideo[];
|
||||
bindImgToggle() {
|
||||
const dataDetail = ConfigManager.tables.TbGirlsDetail.get(this.id);
|
||||
this.refreshImgs(dataDetail.pics, true);
|
||||
const paths = dataDetail.commercialImages.map((a) => a.path);
|
||||
|
||||
this.refreshImgs(paths, true);
|
||||
}
|
||||
|
||||
bindVideoToggle() {
|
||||
this.refreshImgs(this.vids, false);
|
||||
const paths = this.vids.map((a) => a.path);
|
||||
|
||||
this.refreshImgs(paths, false);
|
||||
}
|
||||
|
||||
refreshImgs(paths: string[], isImg: boolean) {
|
||||
|
||||
Reference in New Issue
Block a user