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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user