refactor(hero): adjust monster prefab sizes and add boss scaling logic
调整多个怪物预制体的尺寸参数,同时在怪物基类中添加 Boss 体型放大 1.5 倍的逻辑,小怪保持原尺寸。
This commit is contained in:
@@ -812,8 +812,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 150
|
||||
"width": 80,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -921,12 +921,12 @@
|
||||
"_offset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 75
|
||||
"y": 50
|
||||
},
|
||||
"_size": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 150
|
||||
"width": 80,
|
||||
"height": 100
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -809,8 +809,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 150
|
||||
"width": 80,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -918,12 +918,12 @@
|
||||
"_offset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 75
|
||||
"y": 50
|
||||
},
|
||||
"_size": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 150
|
||||
"width": 60,
|
||||
"height": 100
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -812,8 +812,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 150
|
||||
"width": 80,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -921,12 +921,12 @@
|
||||
"_offset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 75
|
||||
"y": 50
|
||||
},
|
||||
"_size": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 150
|
||||
"width": 8,
|
||||
"height": 100
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -809,8 +809,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 150
|
||||
"width": 80,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -918,12 +918,12 @@
|
||||
"_offset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 75
|
||||
"y": 50
|
||||
},
|
||||
"_size": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 150
|
||||
"width": 80,
|
||||
"height": 100
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -809,8 +809,8 @@
|
||||
},
|
||||
"_contentSize": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 150
|
||||
"width": 80,
|
||||
"height": 100
|
||||
},
|
||||
"_anchorPoint": {
|
||||
"__type__": "cc.Vec2",
|
||||
@@ -918,12 +918,12 @@
|
||||
"_offset": {
|
||||
"__type__": "cc.Vec2",
|
||||
"x": 0,
|
||||
"y": 75
|
||||
"y": 50
|
||||
},
|
||||
"_size": {
|
||||
"__type__": "cc.Size",
|
||||
"width": 150,
|
||||
"height": 150
|
||||
"width": 80,
|
||||
"height": 100
|
||||
},
|
||||
"_id": ""
|
||||
},
|
||||
|
||||
@@ -145,8 +145,8 @@ export class Monster extends ecs.Entity {
|
||||
load(pos: Vec3 = Vec3.ZERO, scale: number = 1, uuid: number = 1001, is_boss: boolean = false, dropToY: number = pos.y, mon_lv: number = 1, laneIndex: number = 0, phase_plan_id: number = 0) {
|
||||
// 怪物默认朝左,表现缩放固定为负向
|
||||
scale = -1
|
||||
// 当前怪物尺寸固定,保留变量便于后续扩展
|
||||
let size = 1
|
||||
// Boss 体型放大 1.5 倍,小怪保持原尺寸
|
||||
let size = is_boss ? 1.5 : 1
|
||||
var scene = smc.map.MapView.scene;
|
||||
// 根据配置读取怪物预制体路径
|
||||
var path = "game/heros/" + HeroInfo[uuid].path;
|
||||
|
||||
Reference in New Issue
Block a user