mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
update
This commit is contained in:
@@ -8,10 +8,14 @@ import { Vec3 } from "cc";
|
||||
|
||||
export default class GBaseMode<T> extends GObject<T> {
|
||||
|
||||
get scene():Node{
|
||||
return this.node;
|
||||
}
|
||||
|
||||
//添加对象到场景中
|
||||
addGObject(obj: GObject<{}>,pos?:Vec2 | Vec3){
|
||||
obj.mode = this;
|
||||
this.node.addChild(obj.node);
|
||||
this.scene.addChild(obj.node);
|
||||
if(pos){
|
||||
obj.node.setWorldPosition(v3(pos.x,pos.y,0));
|
||||
}
|
||||
@@ -19,7 +23,7 @@ export default class GBaseMode<T> extends GObject<T> {
|
||||
|
||||
//添加Node到场景中
|
||||
addGNode(obj:Node,pos?:Vec2 | Vec3){
|
||||
this.node.addChild(obj);
|
||||
this.scene.addChild(obj);
|
||||
if(pos){
|
||||
obj.setWorldPosition(v3(pos.x,pos.y,0));
|
||||
}
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "4a00fcca-5d44-43da-a085-2aece0aaf683",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "e15c838f-470f-4ed6-8594-6f83fda53554",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "c6ed6478-8a11-42b5-ab5a-e302055e39c2",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "651f7991-f580-4d09-a013-54c78bf46740",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "a178786e-130e-4422-b7cd-1fab35d66c76",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -55,6 +55,7 @@ export default class GFSMBase{
|
||||
}
|
||||
|
||||
open(){
|
||||
this.current = 0;
|
||||
this.isClose = false;
|
||||
}
|
||||
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "fe4e5e9b-d1dc-4aaf-9fa8-d089fd6ca00a",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "552fd09c-0320-46c9-ac7a-abe954b75093",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "05230b14-5c88-45fd-99c6-31b4b0513f45",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -66,7 +66,15 @@ export class GFSMBattleAmin extends GFSMBase{
|
||||
//设置监听
|
||||
this.spine.setEventListener(this.onEventListener.bind(this));
|
||||
//因为SpineBUG所以不使用Spine监听 采用自己调用
|
||||
// this.spine.setStartListener(this.onStartListener.bind(this));
|
||||
this.spine.setStartListener(this.onStartListener.bind(this));
|
||||
}
|
||||
|
||||
open(){
|
||||
super.open();
|
||||
//重置
|
||||
Object.values(this.process).forEach(info => {
|
||||
info.track = null;
|
||||
})
|
||||
}
|
||||
|
||||
//添加事件监听
|
||||
@@ -181,7 +189,7 @@ export class GFSMBattleAmin extends GFSMBase{
|
||||
if(!info.track){
|
||||
console.log(`播放动画-${this.spine.getComponent(GObject).nId}-`,info);
|
||||
info.track = this.spine.setAnimation(this.trackIndex,info.animName,info.isLoop);
|
||||
this.onStartListener(info.track);
|
||||
// this.onStartListener(info.track);
|
||||
}
|
||||
|
||||
return to;
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "4c6a60ae-2e26-4c45-8d64-1d7a9b32e7be",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -242,13 +242,13 @@ export default abstract class GRoleBase<T> extends GObject<T>{
|
||||
if(this.nId == 1)
|
||||
console.log("onFly");
|
||||
let vWorld = this.node.worldPosition;
|
||||
let vEndWorld = this.getWorldBackLen(v2(1000,500));
|
||||
let vEndWorld = this.getWorldBackLen(v2(1500,500));
|
||||
this.JTween(vWorld)
|
||||
.to({x:vEndWorld.x},800)
|
||||
.to({x:vEndWorld.x},1000)
|
||||
.onUpdate(pos => this.node.worldPosition = pos)
|
||||
.start();
|
||||
this.JTween(vWorld)
|
||||
.to({y:vEndWorld.y},800)
|
||||
.to({y:vEndWorld.y},1000)
|
||||
.easing(JEasing.Circular.Out)
|
||||
.onUpdate(pos => this.node.worldPosition = vWorld)
|
||||
.start();
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "34152d1b-ca03-4bb1-a970-692cd8995991",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "82abb7d2-2e71-4d33-9853-644778b2abc3",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "5edb3581-4314-4923-8efb-b0b37d182533",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "e8874608-a5f4-47c8-8b57-6ff186b7ec2b",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { _decorator } from "cc";
|
||||
import { _decorator,Node } from "cc";
|
||||
import GBaseMode from "../GBaseMode";
|
||||
import { GTactical } from "../entity/GTactical";
|
||||
import { Prefab } from "cc";
|
||||
@@ -31,6 +31,9 @@ export default class GPVPMode extends GBaseMode<{}>{
|
||||
|
||||
@property(Prefab)
|
||||
rolePrefab: Prefab = null;
|
||||
|
||||
@property(Node)
|
||||
objects: Node = null;
|
||||
|
||||
//玩家信息
|
||||
playerInfo: GPVPModePlayerInfo;
|
||||
@@ -47,6 +50,10 @@ export default class GPVPMode extends GBaseMode<{}>{
|
||||
//敌方位置
|
||||
enemyPos: Vec2 = new Vec2(400,0);
|
||||
|
||||
get scene():Node{
|
||||
return this.objects;
|
||||
}
|
||||
|
||||
onLoad(){
|
||||
super.onLoad();
|
||||
}
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "b1c11eec-4d48-457d-a683-ab9ca5405212",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "74dac201-dfda-47ca-b0b1-414c217fa163",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "43c206f9-e341-454d-8975-d4db0a7410f0",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,12 @@
|
||||
{
|
||||
"ver": "1.2.0",
|
||||
"ver": "1.1.0",
|
||||
"importer": "directory",
|
||||
"imported": true,
|
||||
"uuid": "009f6889-ea1e-4b90-a1a0-d54b0c027189",
|
||||
"files": [],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
"userData": {
|
||||
"compressionType": {},
|
||||
"isRemoteBundle": {}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user