简单PVP

This commit is contained in:
PC-20230316NUNE\Administrator
2023-11-20 18:25:50 +08:00
parent 98b7a52b45
commit 74aabac454
36 changed files with 2972 additions and 261 deletions

View File

@@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "37638c81-4459-4c8d-8054-e5789bce2590",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@@ -0,0 +1,37 @@
import { _decorator, Component, Node } from 'cc';
import { JNGLayerBase } from '../../../components/JNComponent';
import { tween } from 'cc';
import { v3 } from 'cc';
import { app } from '../../../App';
import { GAction } from '../../../consts/GAction';
const { ccclass, property } = _decorator;
/**
* 游戏匹配页面
*/
@ccclass('PVPMatchView')
export class PVPMatchView extends JNGLayerBase {
@property(Node)
content:Node;
onJNLoad(data?: any): void {
super.onJNLoad(data);
tween(this.content)
.repeatForever(
tween()
.to(.5,{scale:v3(.8,.8,.8)})
.to(.5,{scale:v3(1,1,1)})
)
.start();
}
//取消匹配
onClickCancel(){
app.socket.Send(GAction.S_MODE_PVP_LEAVE)
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "9979d56d-f754-44c3-8e29-c764eaeb0aaf",
"files": [],
"subMetas": {},
"userData": {}
}