mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 11:24:46 +00:00
update
This commit is contained in:
parent
0fcc565ece
commit
996b0ecfac
@ -70,7 +70,7 @@ export default class GAttackParabolicRemote implements GAttackBase{
|
|||||||
.onComplete(() => {
|
.onComplete(() => {
|
||||||
|
|
||||||
//生成爆炸特效
|
//生成爆炸特效
|
||||||
let effect = GEffectUtil.create(bang.ske);
|
let effect = GEffectUtil.createOne(bang.ske);
|
||||||
role.mode.addGNode(effect.node,bullet.node.worldPosition);
|
role.mode.addGNode(effect.node,bullet.node.worldPosition);
|
||||||
//获取默认动画
|
//获取默认动画
|
||||||
effect.setAnimation(0,bang.info.animation,false);
|
effect.setAnimation(0,bang.info.animation,false);
|
||||||
|
9
JisolGameCocos/assets/script/battle/base/common/map.meta
Normal file
9
JisolGameCocos/assets/script/battle/base/common/map.meta
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "1.2.0",
|
||||||
|
"importer": "directory",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "12edc337-e391-49c4-9769-33e0da08b510",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
import { _decorator, Component, Node } from 'cc';
|
||||||
|
import { JNGSyncBase } from '../../../../App';
|
||||||
|
import { SpriteFrame } from 'cc';
|
||||||
|
import { Camera } from 'cc';
|
||||||
|
const { ccclass, property } = _decorator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 循环地图
|
||||||
|
*/
|
||||||
|
|
||||||
|
@ccclass('GMapLoop')
|
||||||
|
export class GMapLoop extends JNGSyncBase<{}> {
|
||||||
|
|
||||||
|
map:SpriteFrame; //地图
|
||||||
|
//地图重复次数
|
||||||
|
repeat:number = 1;
|
||||||
|
//一块的地图宽度
|
||||||
|
mapWidth:number = 100;
|
||||||
|
|
||||||
|
//是否初始化
|
||||||
|
isInit:boolean = false;
|
||||||
|
//世界坐标Y轴
|
||||||
|
worldY:number = 0;
|
||||||
|
|
||||||
|
|
||||||
|
init(map:SpriteFrame,repeat:number){
|
||||||
|
this.map = map;
|
||||||
|
this.isInit = true;
|
||||||
|
this.repeat = repeat;
|
||||||
|
this.mapWidth = map.width;
|
||||||
|
}
|
||||||
|
|
||||||
|
//更新地图(世界坐标X)
|
||||||
|
UpdateMap(x:number){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"ver": "4.0.23",
|
||||||
|
"importer": "typescript",
|
||||||
|
"imported": true,
|
||||||
|
"uuid": "0dd9f996-99b0-40ad-ae32-d27f309ecbda",
|
||||||
|
"files": [],
|
||||||
|
"subMetas": {},
|
||||||
|
"userData": {}
|
||||||
|
}
|
@ -14,6 +14,7 @@ import { GTactical } from "../../entity/GTactical";
|
|||||||
import { Vec2 } from "cc";
|
import { Vec2 } from "cc";
|
||||||
import { GSkill, GSkillBase, GSkillState } from "../../skill/GSkill";
|
import { GSkill, GSkillBase, GSkillState } from "../../skill/GSkill";
|
||||||
import { TableGRoleSkill } from "../../../../resources/config/ts/TableGRoleSkill";
|
import { TableGRoleSkill } from "../../../../resources/config/ts/TableGRoleSkill";
|
||||||
|
import JNFrameTime from "../../../../../extensions/ngame/assets/ngame/sync/frame/game/time/JNFrameTime";
|
||||||
const { property,ccclass } = _decorator;
|
const { property,ccclass } = _decorator;
|
||||||
|
|
||||||
//默认角色类
|
//默认角色类
|
||||||
@ -42,6 +43,10 @@ export default class GRoleDefault extends GRoleBase<{}>{
|
|||||||
if(this.isDie){
|
if(this.isDie){
|
||||||
//死亡回调
|
//死亡回调
|
||||||
this.killBack.forEach(fun => fun(this));
|
this.killBack.forEach(fun => fun(this));
|
||||||
|
//死亡销毁
|
||||||
|
JNFrameTime.getInstance().setTimeout(() => {
|
||||||
|
this.node.destroy()
|
||||||
|
},3000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,15 @@ export default class GEffectUtil {
|
|||||||
return ske;
|
return ske;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//创建只播放一次的Spine特效
|
||||||
|
static createOne(spine:sp.SkeletonData):JNSkeleton{
|
||||||
|
let ske = GEffectUtil.create(spine);
|
||||||
|
ske.setCompleteListener(() => {
|
||||||
|
ske.node.destroy();
|
||||||
|
})
|
||||||
|
return ske;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,9 +41,9 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
|||||||
enemyInfo:GOnHookInfo;
|
enemyInfo:GOnHookInfo;
|
||||||
|
|
||||||
//玩家宠物位置
|
//玩家宠物位置
|
||||||
playerPos: Vec2 = new Vec2(400,0);
|
playerPos: Vec2 = new Vec2(-400,0);
|
||||||
//怪物位置
|
//怪物位置
|
||||||
enemyPos: Vec2 = new Vec2(-400,0);
|
enemyPos: Vec2 = new Vec2(400,0);
|
||||||
|
|
||||||
//玩家宠物
|
//玩家宠物
|
||||||
playerRoles: GRoleDefault[] = [];
|
playerRoles: GRoleDefault[] = [];
|
||||||
@ -56,7 +56,7 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
|||||||
console.log("GOnHookMode 模式初始化");
|
console.log("GOnHookMode 模式初始化");
|
||||||
|
|
||||||
this.playerInfo = { tactical: GTactical.getTactical().setOffset(this.playerPos), roles: GRoleUtil.getGRoles([10004,10004,10004,10004,10003,10003]) };
|
this.playerInfo = { tactical: GTactical.getTactical().setOffset(this.playerPos), roles: GRoleUtil.getGRoles([10004,10004,10004,10004,10003,10003]) };
|
||||||
this.enemyInfo = { tactical: GTactical.getTactical(true).setOffset(this.enemyPos), roles: GRoleUtil.getGRoles([10002,10002,10002,10001,10004,10003]) };
|
this.enemyInfo = { tactical: GTactical.getTactical(true).setOffset(this.enemyPos), roles: GRoleUtil.getGRoles([10002]) };
|
||||||
|
|
||||||
//生成玩家
|
//生成玩家
|
||||||
this.playerInfo.roles.forEach((info,index) => this.onGenRole(GOnHookModePlayerEnum.PLAYER,index + 1,info))
|
this.playerInfo.roles.forEach((info,index) => this.onGenRole(GOnHookModePlayerEnum.PLAYER,index + 1,info))
|
||||||
@ -134,7 +134,7 @@ export default class GOnHookMode extends GBaseMode<{}>{
|
|||||||
//生成敌人
|
//生成敌人
|
||||||
onResetGenerateEnemy(){
|
onResetGenerateEnemy(){
|
||||||
this.enemyRoles = [];
|
this.enemyRoles = [];
|
||||||
this.playerInfo.roles.forEach((info,index) => this.onGenRole(GOnHookModePlayerEnum.ENEMY,index + 1,info))
|
this.enemyInfo.roles.forEach((info,index) => this.onGenRole(GOnHookModePlayerEnum.ENEMY,index + 1,info))
|
||||||
}
|
}
|
||||||
|
|
||||||
//角色死亡回调
|
//角色死亡回调
|
||||||
|
@ -65,8 +65,8 @@ export default class GPVPMode extends GBaseMode<{}>{
|
|||||||
//初始化战斗
|
//初始化战斗
|
||||||
console.log("GPVPMode 模式初始化");
|
console.log("GPVPMode 模式初始化");
|
||||||
|
|
||||||
this.playerInfo = { tactical: GTactical.getTactical().setOffset(this.playerPos), roles: GRoleUtil.getGRoles([10001,10001,10001,10001,10003,10003]) };
|
this.playerInfo = { tactical: GTactical.getTactical().setOffset(this.playerPos), roles: GRoleUtil.getGRoles([10004,10001,10004,10002,10003,10003]) };
|
||||||
this.enemyInfo = { tactical: GTactical.getTactical(true).setOffset(this.enemyPos), roles: GRoleUtil.getGRoles([10002,10002,10002,10001,10004,10003]) };
|
this.enemyInfo = { tactical: GTactical.getTactical(true).setOffset(this.enemyPos), roles: GRoleUtil.getGRoles([10002,10002,10001,10003,10004,10003]) };
|
||||||
|
|
||||||
//生成玩家
|
//生成玩家
|
||||||
this.playerInfo.roles.forEach((info,index) => this.onGenRole(GPVPModePlayerEnum.PLAYER,index+1,info))
|
this.playerInfo.roles.forEach((info,index) => this.onGenRole(GPVPModePlayerEnum.PLAYER,index+1,info))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user