mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
聊天UI
This commit is contained in:
9
JisolGameCocos/assets/script/ui/Home/Chat.meta
Normal file
9
JisolGameCocos/assets/script/ui/Home/Chat.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "fc9ef739-d244-407b-8214-003bafd6fe69",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
10
JisolGameCocos/assets/script/ui/Home/Chat/MainChatView.ts
Normal file
10
JisolGameCocos/assets/script/ui/Home/Chat/MainChatView.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { _decorator, Component, Node } from 'cc';
|
||||
import { JNGLayerBase } from '../../../App';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('MainChatView')
|
||||
export class MainChatView extends JNGLayerBase {
|
||||
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"ver": "4.0.23",
|
||||
"importer": "typescript",
|
||||
"imported": true,
|
||||
"uuid": "ec6f0c96-b2be-42ca-93e7-11ba0b7a6625",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
@@ -1,27 +1,18 @@
|
||||
import { _decorator, Component, Label, Node } from 'cc';
|
||||
import { app, JNGLayerBase } from '../../App';
|
||||
import { sp } from 'cc';
|
||||
import PlayerPetData from '../../data/PlayerPetData';
|
||||
import { GUI } from '../UIConfig';
|
||||
import { UIPetAnim } from '../../consts/GData';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
@ccclass('MainView')
|
||||
export class MainView extends JNGLayerBase {
|
||||
|
||||
//宠物
|
||||
@property(sp.Skeleton)
|
||||
spine:sp.Skeleton;
|
||||
|
||||
onJNLoad(data?: any): void {
|
||||
//显示被选择的宠物
|
||||
this.spine.skeletonData = app.battleRes.roleSpine[PlayerPetData.getIns().getData()[0].petTbId];
|
||||
this.spine.setAnimation(0,UIPetAnim.std,true);
|
||||
}
|
||||
|
||||
//点击回到之前的主页
|
||||
onClickHome(){
|
||||
app.layer.Open(GUI.Home);
|
||||
//打开聊天页面
|
||||
onOpenChat(){
|
||||
app.layer.Open(GUI.MainChat);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -13,6 +13,9 @@ export enum GUI{
|
||||
Loading = "Loading", //加载页面
|
||||
Tips = "Tips", //提示
|
||||
|
||||
/** 主页页面 */
|
||||
MainChat = "MainChat", //主页聊天页面
|
||||
|
||||
/** 新手引导 */
|
||||
NoviceNamingView = "NoviceNamingView", //新手引导页面 - 取名
|
||||
NoviceSelectPetView = "NoviceSelectPetView", //新手引导页面 - 选择宠物
|
||||
@@ -50,6 +53,20 @@ const UISystemConfig:{ [key: string]: JNLayerInfo; } = {
|
||||
},
|
||||
}
|
||||
|
||||
//主页UI
|
||||
const UIMainConfig:{ [key: string]: JNLayerInfo; } = {
|
||||
[GUI.MainChat]:{
|
||||
layer:GLayer.Tips,
|
||||
uri: "prefab/ui/主页/聊天/MainChatView",
|
||||
anims:{
|
||||
front:JNLayerAnim.Enlarge,
|
||||
back:JNLayerAnim.Smaller,
|
||||
frontInfo:{key:"position",start:v3(0,-1280,0),end:v3(0,0,0)},
|
||||
backInfo:{key:"position",start:v3(0,0,0),end:v3(0,-1280,0)}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
//新手引导页面
|
||||
const UINoviceConfig:{ [key: string]: JNLayerInfo; } = {
|
||||
|
||||
@@ -95,5 +112,6 @@ export const UIConfig:{ [key: string]: JNLayerInfo; } = {
|
||||
},
|
||||
...UISystemConfig, //系统页面
|
||||
...UINoviceConfig, //新手引导页面
|
||||
...UIMainConfig, //主页面
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user