boss 位置调整
This commit is contained in:
@@ -108,7 +108,7 @@
|
||||
"_lpos": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": 0,
|
||||
"y": 69.272,
|
||||
"y": 0,
|
||||
"z": 0
|
||||
},
|
||||
"_lrot": {
|
||||
@@ -120,8 +120,8 @@
|
||||
},
|
||||
"_lscale": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -0.3,
|
||||
"y": 0.3,
|
||||
"x": -0.5,
|
||||
"y": 0.5,
|
||||
"z": 1
|
||||
},
|
||||
"_mobility": 0,
|
||||
@@ -515,7 +515,7 @@
|
||||
"value": {
|
||||
"__type__": "cc.Vec3",
|
||||
"x": -7.428,
|
||||
"y": 181.711,
|
||||
"y": 186.013,
|
||||
"z": 0
|
||||
}
|
||||
},
|
||||
@@ -890,13 +890,13 @@
|
||||
"_restitution": 0,
|
||||
"_offset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": -2.3,
|
||||
"y": 73.8
|
||||
"x": -3.8,
|
||||
"y": 75.2
|
||||
},
|
||||
"_size": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 75.1,
|
||||
"height": 147.9
|
||||
"width": 73,
|
||||
"height": 199.5
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -19,8 +19,8 @@ const { ccclass, property } = _decorator;
|
||||
@ccclass('Main')
|
||||
export class Main extends Root {
|
||||
start() {
|
||||
// if (DEBUG) profiler.showStats();
|
||||
// PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb
|
||||
if (DEBUG) profiler.showStats();
|
||||
PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb
|
||||
// // | EPhysics2DDrawFlags.Pair
|
||||
// |EPhysics2DDrawFlags.CenterOfMass
|
||||
// |EPhysics2DDrawFlags.Joint
|
||||
|
||||
@@ -105,7 +105,7 @@ export class BossViewComp extends CCComp {
|
||||
// this.node.getChildByName("hp_max").getComponent(Label).string=this.hp_max.toString();
|
||||
|
||||
// this.orginalFlashMaterial = this.sprite.getRenderMaterial(0);
|
||||
this.node.setSiblingIndex(100)
|
||||
// this.node.setSiblingIndex(100)
|
||||
|
||||
|
||||
// 注册单个碰撞体的回调函数
|
||||
@@ -208,7 +208,7 @@ export class BossViewComp extends CCComp {
|
||||
return;
|
||||
}
|
||||
// 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){
|
||||
// console.log("move to ",enemy);
|
||||
|
||||
@@ -99,7 +99,7 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
exp:0,
|
||||
next_exp:100,
|
||||
power:300,
|
||||
skill:8001,
|
||||
skill:1004,
|
||||
skills:[
|
||||
{uuid:1002,cd:2,alive:true },
|
||||
{uuid:1003,cd:3,alive:true},
|
||||
|
||||
@@ -25,12 +25,12 @@ path: 图片地址
|
||||
*/
|
||||
export const SkillSet={
|
||||
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, },
|
||||
1002:{uuid: 1002,path: "1002",type: 1,tg:3,angle:true,level: 1,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, },
|
||||
1003:{uuid: 1003,path: "1003",type: 1,tg:3,angle:true,level: 1,name: "强效射击",sp_name:"b_arrow",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: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, },
|
||||
|
||||
2001:{uuid: 2001,path: "2001",type: 91,tg:1,angle:false,level: 1,name: "治愈术",sp_name:"heath",info:"释放一个寒冰箭攻击敌人",
|
||||
|
||||
@@ -205,7 +205,7 @@ export class MapMonsterComp extends CCComp {
|
||||
load_boss(){
|
||||
let bs:any = RandomManager.instance.getRandomByObjectList(this.boss_list[this.monster_level],1)
|
||||
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 b = ecs.getEntity<Boss>(Boss);
|
||||
let scale = -1
|
||||
|
||||
@@ -137,15 +137,15 @@ export class MonViewComp extends CCComp {
|
||||
}
|
||||
onEndContact (selfCollider: Collider2D, otherCollider: Collider2D) { }
|
||||
onPreSolve (selfCollider: Collider2D, otherCollider: Collider2D) {
|
||||
// if(selfCollider.group == otherCollider.group&&selfCollider.tag==otherCollider.tag){
|
||||
// if(selfCollider.node.position.y < otherCollider.node.position.y){
|
||||
// if(selfCollider.node.getSiblingIndex() < otherCollider.node.getSiblingIndex()){
|
||||
// selfCollider.node.setSiblingIndex(otherCollider.node.getSiblingIndex()+1)
|
||||
// // console.log("onPreSolve b:"+selfCollider.node.uuid+":"+selfCollider.node.getSiblingIndex()+"/"+otherCollider.node.uuid+":"+otherCollider.node.getSiblingIndex());
|
||||
// }
|
||||
if(selfCollider.group == otherCollider.group&&selfCollider.tag==otherCollider.tag){
|
||||
if(selfCollider.node.position.y < otherCollider.node.position.y){
|
||||
if(selfCollider.node.getSiblingIndex() < otherCollider.node.getSiblingIndex()){
|
||||
selfCollider.node.setSiblingIndex(otherCollider.node.getSiblingIndex()+1)
|
||||
// console.log("onPreSolve b:"+selfCollider.node.uuid+":"+selfCollider.node.getSiblingIndex()+"/"+otherCollider.node.uuid+":"+otherCollider.node.getSiblingIndex());
|
||||
}
|
||||
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
if(selfCollider.group != otherCollider.group&&otherCollider.tag == 0){
|
||||
this.stop_cd = 0.1;
|
||||
this.is_atking=true
|
||||
|
||||
Reference in New Issue
Block a user