This commit is contained in:
DESKTOP-5RP3AKU\Jisol 2023-10-25 02:31:51 +08:00
parent ee259880b0
commit 08a486c828
18 changed files with 533 additions and 123 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

View File

@ -0,0 +1,9 @@
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "91200219-cf2f-4928-b01a-a3de1f556a1e",
"files": [],
"subMetas": {},
"userData": {}
}

View File

@ -1,62 +1,62 @@
guaiA1a.png
size: 512,128
size: 146,288
format: RGBA8888
filter: Linear,Linear
repeat: none
guaiA1a/beimian
rotate: false
xy: 2, 2
size: 125, 115
xy: 2, 173
size: 123, 113
orig: 125, 115
offset: 0, 0
offset: 1, 1
index: -1
guaiA1a/jiao1
rotate: false
xy: 161, 11
size: 29, 34
rotate: true
xy: 110, 3
size: 27, 32
orig: 29, 34
offset: 0, 0
offset: 1, 1
index: -1
guaiA1a/jiao2
rotate: false
xy: 129, 8
size: 30, 37
rotate: true
xy: 73, 2
size: 28, 35
orig: 30, 37
offset: 0, 0
offset: 1, 1
index: -1
guaiA1a/jiao3
rotate: false
xy: 358, 63
size: 71, 54
rotate: true
xy: 88, 32
size: 69, 51
orig: 71, 54
offset: 0, 0
offset: 1, 1
index: -1
guaiA1a/jiao4
rotate: false
xy: 431, 63
size: 71, 54
xy: 2, 2
size: 69, 51
orig: 71, 54
offset: 0, 0
offset: 1, 1
index: -1
guaiA1a/shenti
rotate: false
xy: 129, 47
size: 139, 70
xy: 2, 103
size: 137, 68
orig: 139, 70
offset: 0, 0
offset: 1, 1
index: -1
guaiA1a/yan
rotate: false
xy: 270, 48
size: 43, 19
rotate: true
xy: 127, 245
size: 41, 17
orig: 43, 19
offset: 0, 0
offset: 1, 1
index: -1
guaiA1a/ye
rotate: false
xy: 270, 69
size: 86, 48
xy: 2, 55
size: 84, 46
orig: 86, 48
offset: 0, 0
offset: 1, 1
index: -1

View File

@ -2,7 +2,7 @@
"ver": "1.0.1",
"importer": "*",
"imported": true,
"uuid": "73de6ac4-0559-42d0-b426-1f0c681fd5ab",
"uuid": "9eb72656-748d-4794-8dac-4b7299e6cd39",
"files": [
".atlas",
".json"

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@
"ver": "1.2.6",
"importer": "spine-data",
"imported": true,
"uuid": "c1cb94d4-afaf-4205-97ba-8896abcb7ec1",
"uuid": "42029fae-0ee0-48c1-b7c5-850c03664ae4",
"files": [
".json"
],

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -2,7 +2,7 @@
"ver": "1.0.26",
"importer": "image",
"imported": true,
"uuid": "d749e084-5bd8-4c0c-877b-6e488137649d",
"uuid": "2357c44f-3cf0-47eb-8f7a-0f303eaefe08",
"files": [
".json",
".png"
@ -10,14 +10,14 @@
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "d749e084-5bd8-4c0c-877b-6e488137649d@6c48a",
"uuid": "2357c44f-3cf0-47eb-8f7a-0f303eaefe08@6c48a",
"displayName": "guaiA1a",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "d749e084-5bd8-4c0c-877b-6e488137649d",
"imageUuidOrDatabaseUri": "2357c44f-3cf0-47eb-8f7a-0f303eaefe08",
"isUuid": true,
"visible": false,
"minfilter": "linear",
@ -34,7 +34,7 @@
},
"f9941": {
"importer": "sprite-frame",
"uuid": "d749e084-5bd8-4c0c-877b-6e488137649d@f9941",
"uuid": "2357c44f-3cf0-47eb-8f7a-0f303eaefe08@f9941",
"displayName": "guaiA1a",
"id": "f9941",
"name": "spriteFrame",
@ -42,14 +42,14 @@
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -4,
"offsetY": 4.5,
"trimX": 3,
"trimY": 3,
"width": 498,
"height": 113,
"rawWidth": 512,
"rawHeight": 128,
"offsetX": 0,
"offsetY": 0,
"trimX": 2,
"trimY": 2,
"width": 142,
"height": 284,
"rawWidth": 146,
"rawHeight": 288,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@ -61,17 +61,17 @@
"meshType": 0,
"vertices": {
"rawPosition": [
-249,
-56.5,
-71,
-142,
0,
249,
-56.5,
71,
-142,
0,
-249,
56.5,
-71,
142,
0,
249,
56.5,
71,
142,
0
],
"indexes": [
@ -83,38 +83,38 @@
3
],
"uv": [
3,
125,
501,
125,
3,
12,
501,
12
2,
286,
144,
286,
2,
2,
144,
2
],
"nuv": [
0.005859375,
0.09375,
0.978515625,
0.09375,
0.005859375,
0.9765625,
0.978515625,
0.9765625
0.0136986301369863,
0.006944444444444444,
0.9863013698630136,
0.006944444444444444,
0.0136986301369863,
0.9930555555555556,
0.9863013698630136,
0.9930555555555556
],
"minPos": [
-249,
-56.5,
-71,
-142,
0
],
"maxPos": [
249,
56.5,
71,
142,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "d749e084-5bd8-4c0c-877b-6e488137649d@6c48a",
"imageUuidOrDatabaseUri": "2357c44f-3cf0-47eb-8f7a-0f303eaefe08@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
@ -129,6 +129,6 @@
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "d749e084-5bd8-4c0c-877b-6e488137649d@f9941"
"redirect": "2357c44f-3cf0-47eb-8f7a-0f303eaefe08@f9941"
}
}

View File

@ -17,12 +17,123 @@
"_objFlags": 0,
"__editorExtras__": {},
"_parent": null,
"_children": [],
"_children": [
{
"__id__": 2
}
],
"_active": true,
"_components": [
{
"__id__": 2
"__id__": 16
},
{
"__id__": 18
},
{
"__id__": 20
}
],
"_prefab": {
"__id__": 22
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "blood",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 1
},
"_children": [
{
"__id__": 3
}
],
"_active": true,
"_components": [
{
"__id__": 9
},
{
"__id__": 11
},
{
"__id__": 13
}
],
"_prefab": {
"__id__": 15
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -51.954,
"y": 126.253,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"z": 1
},
"_mobility": 0,
"_layer": 1,
"_euler": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "Bar",
"_objFlags": 0,
"__editorExtras__": {},
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_components": [
{
"__id__": 4
},
@ -62,6 +173,203 @@
},
"_id": ""
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 3
},
"_enabled": true,
"__prefab": {
"__id__": 5
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 15
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "f6mlvX+zpDQKQyTNI8m1ge"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 3
},
"_enabled": true,
"__prefab": {
"__id__": 7
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "24a704da-2867-446d-8d1a-5e920c75e09d@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "ab2/RZSBpHM6hxBpsZcelP"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "d6plfNQY5CgK2nsYLzhuGq",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 10
},
"_contentSize": {
"__type__": "cc.Size",
"width": 100,
"height": 15
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0.5
},
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "7eKZQXr4dA9ZZ1pNU9m4Id"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 12
},
"_customMaterial": null,
"_srcBlendFactor": 2,
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_spriteFrame": {
"__uuid__": "9fd900dd-221b-4f89-8f2c-fba34243c835@f9941",
"__expectedType__": "cc.SpriteFrame"
},
"_type": 1,
"_fillType": 0,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
},
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_atlas": null,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "6dRnnmVKhM8KMkR+Ef0QZc"
},
{
"__type__": "cc.ProgressBar",
"_name": "",
"_objFlags": 0,
"__editorExtras__": {},
"node": {
"__id__": 2
},
"_enabled": true,
"__prefab": {
"__id__": 14
},
"_barSprite": {
"__id__": 6
},
"_mode": 0,
"_totalLength": 100,
"_progress": 1,
"_reverse": false,
"_id": ""
},
{
"__type__": "cc.CompPrefabInfo",
"fileId": "13jsaXw0ZN24wtPkmda7Fc"
},
{
"__type__": "cc.PrefabInfo",
"root": {
"__id__": 1
},
"asset": {
"__id__": 0
},
"fileId": "4duWBgdflEeJnCTVFxBgL5",
"instance": null,
"targetOverrides": null,
"nestedPrefabInstanceRoots": null
},
{
"__type__": "cc.UITransform",
"_name": "",
@ -72,7 +380,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 3
"__id__": 17
},
"_contentSize": {
"__type__": "cc.Size",
@ -81,8 +389,8 @@
},
"_anchorPoint": {
"__type__": "cc.Vec2",
"x": 0,
"y": 0
"x": 0.5040967210222901,
"y": 0.07770745417182541
},
"_id": ""
},
@ -100,7 +408,7 @@
},
"_enabled": true,
"__prefab": {
"__id__": 5
"__id__": 19
},
"_customMaterial": null,
"_srcBlendFactor": 2,
@ -113,11 +421,11 @@
"a": 255
},
"_skeletonData": {
"__uuid__": "c1cb94d4-afaf-4205-97ba-8896abcb7ec1",
"__uuid__": "42029fae-0ee0-48c1-b7c5-850c03664ae4",
"__expectedType__": "sp.SkeletonData"
},
"defaultSkin": "default",
"defaultAnimation": "walk",
"defaultAnimation": "",
"_premultipliedAlpha": true,
"_timeScale": 1,
"_preCacheMode": 0,
@ -146,7 +454,10 @@
},
"_enabled": true,
"__prefab": {
"__id__": 7
"__id__": 21
},
"bloodVolume": {
"__id__": 13
},
"_id": ""
},

View File

@ -23,7 +23,7 @@ class JNGLayer extends JNLayer{
//重写Socket
class JNGSocket extends JNSocket{
public url() {
return "ws://192.168.0.127:8080/websocket";
return "ws://localhost:8080/websocket";
}
}
@ -96,7 +96,7 @@ export const app = {
event : EventDispatcher.getIns(), //通知
proto : NGameMessage.getIns(), //消息
api : axios.create({
baseURL: "http://192.168.0.127:8080",
baseURL: "http://localhost:8080",
}), //请求
battle : GBattleModeManager.getIns(), //战斗
}

View File

@ -2,7 +2,6 @@ import { _decorator, Component, director, instantiate, Node, Prefab } from 'cc';
import { app } from './App';
import { JNGame } from '../../extensions/ngame/assets/ngame/JNGame';
import { JNSyncAction } from '../../extensions/ngame/assets/ngame/sync/JNSyncAction';
import JNFrameTween, { JTween } from '../../extensions/ngame/assets/ngame/sync/frame/game/tween/JNFrameTween';
const { ccclass, property } = _decorator;
@ccclass('Main')
@ -16,8 +15,6 @@ export class Main extends Component {
async onLoad(){
JTween().start();
//加载 APP
await JNGame.Init(app,[
{path:"proto/GDemo"}

View File

@ -70,7 +70,8 @@ export default class GPVPMode extends GBaseMode{
entity.ones = type;
entity.tactical = this.getInfo(type).tactical;
entity.tacticalIndex = index;
this.addGObject(entity,this.getInfo(type).tactical.getPosition(index,this.getTacticalPos(type)));
entity.tacticalPos = this.getInfo(type).tactical.getPosition(index,this.getTacticalPos(type));
this.addGObject(entity,entity.tacticalPos);
this.getOnesRole(type).push(entity);
}

View File

@ -25,25 +25,25 @@ export default abstract class GFSMBattle extends GFSMBase{
title:"寻找敌人",
execute: this.onSeekEnemyProcess.bind(this),
// to:[ProcessEnum.MoveToAttackRange], //移动到可攻击范围
to:[ProcessEnum.AttackEnemy], //移动到可攻击范围
to:[ProcessEnum.MoveToAttackRange], //移动到可攻击范围
},
[ProcessEnum.MoveToAttackRange]:{
title:"移动到可攻击范围",
mode:GFSMProcessMode.WaitExecute,
execute: this.onMoveToAttackRangeProcess.bind(this),
to:[ProcessEnum.AttackEnemy,ProcessEnum.MoveToTactical] //攻击敌人 回阵型
to:[ProcessEnum.AttackEnemy] //攻击敌人 回阵型
},
[ProcessEnum.AttackEnemy]:{
title:"攻击敌人",
mode:GFSMProcessMode.WaitExecute,
execute: this.onAttackProcess.bind(this),
to:[ProcessEnum.MoveToTactical],//移动回阵型
},
[ProcessEnum.MoveToTactical]:{
title:"移动回阵型",
mode:GFSMProcessMode.WaitExecute,
execute: this.onMoveToTacticalProcess.bind(this),
to:[ProcessEnum.SeekEnemy], //寻找敌人
}
// [ProcessEnum.MoveToTactical]:{
// title:"移动回阵型",
// mode:GFSMProcessMode.WaitExecute,
// execute: this.onMoveToTacticalProcess.bind(this),
// }
}
//锁定的敌人
@ -59,6 +59,10 @@ export default abstract class GFSMBattle extends GFSMBase{
//寻敌流程
onSeekEnemyProcess(dt:number):number{
//播放等待
this.player.fsmAnim.isMove = false;
this.player.fsmAnim.isAttack = false;
if(this.enemy){
//如果有敌人 直接 攻击
return ProcessEnum.MoveToAttackRange;
@ -75,10 +79,14 @@ export default abstract class GFSMBattle extends GFSMBase{
}
//移动可攻击范围
onMoveToAttackRangeProcess(){
onMoveToAttackRangeProcess(dt:number){
//如果没有敌人则回阵型
if(!this.enemy) return ProcessEnum.MoveToTactical;
//播放移动
this.player.fsmAnim.isMove = true;
this.player.fsmAnim.isAttack = false;
//如果没有敌人则重置
if(!this.enemy) return GFSMProcessEnum.Reset;
let distance = Vec2.distance(this.player.v2World,this.enemy.v2World);
@ -87,24 +95,34 @@ export default abstract class GFSMBattle extends GFSMBase{
return ProcessEnum.AttackEnemy;
}else{
//靠近目标
// this.player.
this.player.onMoveTarget(this.enemy.v2World,dt);
return GFSMProcessEnum.Wait;
}
}
//移动回阵型
onMoveToTacticalProcess(){
onMoveToTacticalProcess(dt:number){
//播放移动
this.player.fsmAnim.isMove = true;
this.player.fsmAnim.isAttack = false;
if(this.player.onMoveTarget(this.player.tacticalPos,dt)){
//回到阵容 重置
return GFSMProcessEnum.Reset;
}
return GFSMProcessEnum.Wait;
}
onAttack(dt:number){
this.player.onAttackUpdate(dt);
}
//攻击敌人
onAttackProcess(dt:number){
this.onAttack(dt);
return GFSMProcessEnum.Reset;
//播放移动
this.player.fsmAnim.isMove = false;
this.player.fsmAnim.isAttack = true;
return GFSMProcessEnum.Wait;
}

View File

@ -20,6 +20,7 @@ export interface GFSMProcessAnimInfo extends GFSMProcessInfo{
mixs?:number[];
//播放的轨道
track?:sp.spine.TrackEntry;
//条件跳转
ifTo?:(() => boolean)[];
}
@ -48,12 +49,31 @@ export class GFSMBattleAmin extends GFSMBase{
//动画Root
spine:sp.Skeleton;
events:{event:string,fun:Function}[] = [];
constructor(spine:sp.Skeleton,trackIndex?:number){
super();
this.spine = spine;
this.trackIndex = trackIndex || 0;
//设置监听
this.spine.setEventListener(this.onEventListener.bind(this));
}
//添加事件监听
addEventListener(event:string,fun:Function){
this.events.push({
event,
fun,
})
}
onEventListener(entry: sp.spine.TrackEntry, ev: sp.spine.Event){
this.events.forEach(item => {
if(item.event == ev.data.name){
item.fun();
}
});
}
// 流程图
process: { [key: number]: GFSMProcessAnimInfo; } = {
@ -130,6 +150,5 @@ export class GFSMBattleAmin extends GFSMBase{
}
}

View File

@ -6,8 +6,14 @@ import GFSMBattle from "../fsm/base/GFSMBattle/GFSMBattle";
import { GFSMBattleAmin } from "../fsm/base/GFSMBattle/GFSMBattleAmin";
import { Vec2 } from "cc";
import { v2 } from "cc";
import { v3 } from "cc";
import { GTactical } from "../../entity/GTactical";
const { ccclass, property } = _decorator;
export enum GRoleAnimEvent{
Attack = "attack", //普通攻击
}
//角色基类
export default abstract class GRoleBase<T> extends GObject<T>{
@ -24,7 +30,23 @@ export default abstract class GRoleBase<T> extends GObject<T>{
_isMirror:boolean = false;
//玩家攻击范围
range:number = 10;
range:number = 100;
//移动速度
moveSpeed:number = 80;
//在阵容中的下标
tacticalIndex:number;
//阵容
tactical:GTactical;
//阵容位置
_tacticalPos:Vec2;
get tacticalPos(){ return this._tacticalPos}
set tacticalPos(value:Vec2){ this._tacticalPos = value}
//血量
blood:number = 100;
fullBlood:number = 100;
get isMirror(){
return this._isMirror;
@ -51,9 +73,24 @@ export default abstract class GRoleBase<T> extends GObject<T>{
this.fsm = this.fsmCreate();
//创建角色动画状态机
this.fsmAnim = this.fsmAnimCreate();
//监听攻击
this.fsmAnim.addEventListener(GRoleAnimEvent.Attack,this.onAttack.bind(this));
}
//攻击
onAttack(){
//敌人扣血
this.fsm.enemy.onHit();
}
//受击
onHit(){
this.blood--;
}
//创建一个状态机
protected abstract fsmCreate():GFSMBattle;
//创建一个动画状态机
@ -61,14 +98,26 @@ export default abstract class GRoleBase<T> extends GObject<T>{
onSyncUpdate(dt: number,frame:JNFrameInfo, input?: T){
//更新状态机
this.fsm && this.fsm.onUpdate(dt);
this.fsmAnim && this.fsmAnim.onUpdate(dt);
this.fsm && this.fsm.onUpdate(dt / 1000);
this.fsmAnim && this.fsmAnim.onUpdate(dt / 1000);
}
//普攻更新
onAttackUpdate(dt:number){
this.fsmAnim.isAttack = true;
//向目标点移动
onMoveTarget(target:Vec2,dt:number){
//获取两个坐标差值向量
let mins = this.v2World.subtract(target);
let normal = this.v2World.subtract(target).normalize();
if(Vec2.len(normal) >= Vec2.len(mins)){
this.node.setWorldPosition(Object.assign(v3(),target.clone()));
return true;
}else{
//移动
this.node.worldPosition = this.node.worldPosition.subtract(v3(normal.x*dt*this.moveSpeed,normal.y*dt*this.moveSpeed,0))
return false;
}
}
}

View File

@ -6,6 +6,9 @@ import GPVPMode, { GPVPModePlayerEnum } from "../../../PVP/GPVPMode";
import { GTactical } from "../../../entity/GTactical";
import { GFSMBattleAmin } from "../../fsm/base/GFSMBattle/GFSMBattleAmin";
import { JNFrameInfo } from "../../../../../../extensions/ngame/assets/ngame/sync/frame/JNSyncFrame";
import { Vec2 } from "cc";
import { v2 } from "cc";
import { ProgressBar } from "cc";
const { ccclass, property } = _decorator;
export interface GDemoMessage{
@ -19,7 +22,6 @@ export default class GRolePVPEntity extends GRoleBase<GDemoMessage>{
//所属阵容
_ones:GPVPModePlayerEnum;
get ones():GPVPModePlayerEnum{
return this._ones;
}
@ -33,11 +35,12 @@ export default class GRolePVPEntity extends GRoleBase<GDemoMessage>{
this._ones = value;
}
//攻击距离
@property(ProgressBar)
bloodVolume:ProgressBar;
//在阵容中的下标
tacticalIndex:number;
tactical:GTactical;
onSyncLoad(){
super.onSyncLoad();
}
getClassName():string{return "GDemoMessage"}
onSyncUpdate(dt: number,frame:JNFrameInfo, input?: GDemoMessage) {
@ -50,6 +53,9 @@ export default class GRolePVPEntity extends GRoleBase<GDemoMessage>{
this.fsmAnim.isMove = input.isRun;
}
}
//更新血量显示
this.bloodVolume.progress = this.blood / this.fullBlood;
}
@ -61,7 +67,7 @@ export default class GRolePVPEntity extends GRoleBase<GDemoMessage>{
}
protected fsmCreate(): GFSMPVP {
return null;
// return null;
return new GFSMPVP(this);
}
protected fsmAnimCreate(): GFSMBattleAmin {