boss 位置调整

This commit is contained in:
2024-09-20 11:05:26 +08:00
parent c7e0430ccb
commit 4baee558c5
7 changed files with 26 additions and 26 deletions

View File

@@ -108,7 +108,7 @@
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 69.272, "y": 0,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
@@ -120,8 +120,8 @@
}, },
"_lscale": { "_lscale": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": -0.3, "x": -0.5,
"y": 0.3, "y": 0.5,
"z": 1 "z": 1
}, },
"_mobility": 0, "_mobility": 0,
@@ -515,7 +515,7 @@
"value": { "value": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": -7.428, "x": -7.428,
"y": 181.711, "y": 186.013,
"z": 0 "z": 0
} }
}, },
@@ -890,13 +890,13 @@
"_restitution": 0, "_restitution": 0,
"_offset": { "_offset": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
"x": -2.3, "x": -3.8,
"y": 73.8 "y": 75.2
}, },
"_size": { "_size": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 75.1, "width": 73,
"height": 147.9 "height": 199.5
}, },
"_id": "" "_id": ""
}, },

View File

@@ -19,8 +19,8 @@ const { ccclass, property } = _decorator;
@ccclass('Main') @ccclass('Main')
export class Main extends Root { export class Main extends Root {
start() { start() {
// if (DEBUG) profiler.showStats(); if (DEBUG) profiler.showStats();
// PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb
// // | EPhysics2DDrawFlags.Pair // // | EPhysics2DDrawFlags.Pair
// |EPhysics2DDrawFlags.CenterOfMass // |EPhysics2DDrawFlags.CenterOfMass
// |EPhysics2DDrawFlags.Joint // |EPhysics2DDrawFlags.Joint

View File

@@ -105,7 +105,7 @@ export class BossViewComp extends CCComp {
// this.node.getChildByName("hp_max").getComponent(Label).string=this.hp_max.toString(); // this.node.getChildByName("hp_max").getComponent(Label).string=this.hp_max.toString();
// this.orginalFlashMaterial = this.sprite.getRenderMaterial(0); // this.orginalFlashMaterial = this.sprite.getRenderMaterial(0);
this.node.setSiblingIndex(100) // this.node.setSiblingIndex(100)
// 注册单个碰撞体的回调函数 // 注册单个碰撞体的回调函数
@@ -208,7 +208,7 @@ export class BossViewComp extends CCComp {
return; return;
} }
// this.set_diry() // this.set_diry()
this.node.setPosition(this.node.position.x+dt*this.speed*this.scale, this.node.position.y+dt*this.dir_y, this.node.position.z); this.node.setPosition(this.node.position.x+dt*this.speed*this.scale, this.node.position.y, this.node.position.z);
} }
move_to(enemy:Vec3){ move_to(enemy:Vec3){
// console.log("move to ",enemy); // console.log("move to ",enemy);

View File

@@ -99,7 +99,7 @@ export class SingletonModuleComp extends ecs.Comp {
exp:0, exp:0,
next_exp:100, next_exp:100,
power:300, power:300,
skill:8001, skill:1004,
skills:[ skills:[
{uuid:1002,cd:2,alive:true }, {uuid:1002,cd:2,alive:true },
{uuid:1003,cd:3,alive:true}, {uuid:1003,cd:3,alive:true},

View File

@@ -25,12 +25,12 @@ path: 图片地址
*/ */
export const SkillSet={ export const SkillSet={
1001:{uuid: 1001,path: "1001",type: 1,tg:3,angle:true,level: 1,name: "火球术",sp_name:"fire",info:"释放一个火球术攻击敌人", 1001:{uuid: 1001,path: "1001",type: 1,tg:3,angle:true,level: 1,name: "火球术",sp_name:"fire",info:"释放一个火球术攻击敌人",
dis:1,count:1,in:0,run:0,atk:10,hp:0,shield:0,sd:10,cd:3,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:600, },
1002:{uuid: 1002,path: "1002",type: 1,tg:3,angle:true,level: 3,name: "寒冰箭",sp_name:"ice",info:"释放一个寒冰箭攻击敌人",
dis:1,count:1,in:0,run:0,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:600, }, dis:1,count:1,in:0,run:0,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:600, },
1002:{uuid: 1002,path: "1002",type: 1,tg:3,angle:true,level: 1,name: "寒冰箭",sp_name:"ice",info:"释放一个寒冰箭攻击敌人", 1003:{uuid: 1003,path: "1003",type: 1,tg:3,angle:true,level: 3,name: "强效射击",sp_name:"b_arrow",info:"释放一个火球术攻击敌人",
dis:1,count:1,in:0,run:0,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:600, },
1003:{uuid: 1003,path: "1003",type: 1,tg:3,angle:true,level: 1,name: "强效射击",sp_name:"b_arrow",info:"释放一个火球术攻击敌人",
dis:1,count:1,in:0,run:1,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:600, }, dis:1,count:1,in:0,run:1,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:600, },
1004:{uuid: 1004,path: "1004",type: 1,tg:3,angle:true,level: 1,name: "奥术冲击",sp_name:"bm_ball",info:"释放一个寒冰箭攻击敌人", 1004:{uuid: 1004,path: "1004",type: 1,tg:3,angle:true,level: 3,name: "奥术冲击",sp_name:"bm_ball",info:"释放一个寒冰箭攻击敌人",
dis:1,count:1,in:0,run:0,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:600, }, dis:1,count:1,in:0,run:0,atk:10,hp:0,shield:0,sd:10,cd:1,bsd:0,bcd:0,sk_uuid:1001,sk_count:0,speed:600, },
2001:{uuid: 2001,path: "2001",type: 91,tg:1,angle:false,level: 1,name: "治愈术",sp_name:"heath",info:"释放一个寒冰箭攻击敌人", 2001:{uuid: 2001,path: "2001",type: 91,tg:1,angle:false,level: 1,name: "治愈术",sp_name:"heath",info:"释放一个寒冰箭攻击敌人",

View File

@@ -205,7 +205,7 @@ export class MapMonsterComp extends CCComp {
load_boss(){ load_boss(){
let bs:any = RandomManager.instance.getRandomByObjectList(this.boss_list[this.monster_level],1) let bs:any = RandomManager.instance.getRandomByObjectList(this.boss_list[this.monster_level],1)
var scene = smc.map.MapView.scene; var scene = smc.map.MapView.scene;
let pos:Vec3 = v3(260,BoxSet.GAME_LINE-50) let pos:Vec3 = v3(260,BoxSet.GAME_LINE)
let layer = scene.entityLayer!.node! let layer = scene.entityLayer!.node!
let b = ecs.getEntity<Boss>(Boss); let b = ecs.getEntity<Boss>(Boss);
let scale = -1 let scale = -1

View File

@@ -137,15 +137,15 @@ export class MonViewComp extends CCComp {
} }
onEndContact (selfCollider: Collider2D, otherCollider: Collider2D) { } onEndContact (selfCollider: Collider2D, otherCollider: Collider2D) { }
onPreSolve (selfCollider: Collider2D, otherCollider: Collider2D) { onPreSolve (selfCollider: Collider2D, otherCollider: Collider2D) {
// if(selfCollider.group == otherCollider.group&&selfCollider.tag==otherCollider.tag){ if(selfCollider.group == otherCollider.group&&selfCollider.tag==otherCollider.tag){
// if(selfCollider.node.position.y < otherCollider.node.position.y){ if(selfCollider.node.position.y < otherCollider.node.position.y){
// if(selfCollider.node.getSiblingIndex() < otherCollider.node.getSiblingIndex()){ if(selfCollider.node.getSiblingIndex() < otherCollider.node.getSiblingIndex()){
// selfCollider.node.setSiblingIndex(otherCollider.node.getSiblingIndex()+1) selfCollider.node.setSiblingIndex(otherCollider.node.getSiblingIndex()+1)
// // console.log("onPreSolve b:"+selfCollider.node.uuid+":"+selfCollider.node.getSiblingIndex()+"/"+otherCollider.node.uuid+":"+otherCollider.node.getSiblingIndex()); // console.log("onPreSolve b:"+selfCollider.node.uuid+":"+selfCollider.node.getSiblingIndex()+"/"+otherCollider.node.uuid+":"+otherCollider.node.getSiblingIndex());
// } }
// } }
// } }
if(selfCollider.group != otherCollider.group&&otherCollider.tag == 0){ if(selfCollider.group != otherCollider.group&&otherCollider.tag == 0){
this.stop_cd = 0.1; this.stop_cd = 0.1;
this.is_atking=true this.is_atking=true