From 9b4e9073a24d827d6b66dccb75665b80b8dc6009 Mon Sep 17 00:00:00 2001 From: panw Date: Mon, 21 Jul 2025 10:08:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E6=97=B6=20=E8=A7=A3=E5=86=B3=20?= =?UTF-8?q?=E8=A1=80=E6=9D=A1=E9=94=99=E4=BD=8D=E5=92=8C=20=E6=89=93?= =?UTF-8?q?=E5=88=B0=E6=96=B0=E4=BA=A7=E7=94=9F=E7=9A=84=E6=80=AA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/resources/game/heros/top.prefab | 10 ++--- assets/script/Main.ts | 2 +- assets/script/game/common/config/heroSet.ts | 45 ++++++++++++--------- assets/script/game/hero/BuffComp.ts | 4 +- assets/script/game/map/MissionMonComp.ts | 8 ++-- 5 files changed, 39 insertions(+), 30 deletions(-) diff --git a/assets/resources/game/heros/top.prefab b/assets/resources/game/heros/top.prefab index 8fdad207..3e79fcef 100644 --- a/assets/resources/game/heros/top.prefab +++ b/assets/resources/game/heros/top.prefab @@ -97,7 +97,7 @@ "_lpos": { "__type__": "cc.Vec3", "x": 0, - "y": -15, + "y": 0, "z": 0 }, "_lrot": { @@ -414,7 +414,7 @@ "y": 0 }, "_fillStart": 0, - "_fillRange": 1, + "_fillRange": 0.2, "_isTrimmedMode": true, "_useGrayscale": false, "_atlas": null, @@ -509,7 +509,7 @@ "node": { "__id__": 2 }, - "_enabled": false, + "_enabled": true, "__prefab": { "__id__": 22 }, @@ -563,7 +563,7 @@ }, "_mode": 2, "_totalLength": 1, - "_progress": 1, + "_progress": 0.2, "_reverse": false, "_id": "" }, @@ -733,7 +733,7 @@ "_anchorPoint": { "__type__": "cc.Vec2", "x": 0.5, - "y": 0 + "y": 0.5 }, "_id": "" }, diff --git a/assets/script/Main.ts b/assets/script/Main.ts index 322260f7..e2ecf0ed 100644 --- a/assets/script/Main.ts +++ b/assets/script/Main.ts @@ -14,7 +14,7 @@ const { ccclass, property } = _decorator; @ccclass('Main') export class Main extends Root { start() { - PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb + // PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb } protected async run() { smc.initialize = ecs.getEntity(Initialize); diff --git a/assets/script/game/common/config/heroSet.ts b/assets/script/game/common/config/heroSet.ts index d5a0b00c..3d7b44c1 100644 --- a/assets/script/game/common/config/heroSet.ts +++ b/assets/script/game/common/config/heroSet.ts @@ -53,24 +53,33 @@ export const HQuality = { ORANGE:5, } export const MonSet = { - 0:{pos:v3(370,0,0)}, - 1:{pos:v3(370,+80,0)}, - 2:{pos:v3(370,-80,0)}, - 3:{pos:v3(400,0,0)}, - 4:{pos:v3(420,0,0)}, - 5:{pos:v3(440,0,0)}, - 6:{pos:v3(460,0,0)}, - 7:{pos:v3(480,0,0)}, - 8:{pos:v3(500,0,0)}, - 9:{pos:v3(520,0,0)}, - 10:{pos:v3(540,0,0)}, - 11:{pos:v3(560,0,0)}, - 12:{pos:v3(580,0,0)}, - 13:{pos:v3(600,0,0)}, - 14:{pos:v3(620,0,0)}, - 15:{pos:v3(640,0,0)}, - 16:{pos:v3(660,0,0)}, - 17:{pos:v3(680,0,0)}, + 0:{pos:v3(390,0,0)}, + 1:{pos:v3(390,+80,0)}, + 2:{pos:v3(390,-80,0)}, + 3:{pos:v3(420,0,0)}, + 4:{pos:v3(420,+80,0)}, + 5:{pos:v3(420,-80,0)}, + 6:{pos:v3(450,0,0)}, + 7:{pos:v3(450,+80,0)}, + 8:{pos:v3(450,-80,0)}, + 9:{pos:v3(480,0,0)}, + 10:{pos:v3(480,+80,0)}, + 11:{pos:v3(480,-80,0)}, + 12:{pos:v3(510,0,0)}, + 13:{pos:v3(510,+80,0)}, + 14:{pos:v3(510,-80,0)}, + 15:{pos:v3(540,0,0)}, + 16:{pos:v3(540,+80,0)}, + 17:{pos:v3(540,-80,0)}, + 18:{pos:v3(570,0,0)}, + 19:{pos:v3(570,+80,0)}, + 20:{pos:v3(570,-80,0)}, + 21:{pos:v3(600,0,0)}, + 22:{pos:v3(600,+80,0)}, + 23:{pos:v3(600,-80,0)}, + 24:{pos:v3(630,0,0)}, + 25:{pos:v3(630,+80,0)}, + 26:{pos:v3(630,-80,0)}, } // 经验值计算函数 - 复杂递增规律 diff --git a/assets/script/game/hero/BuffComp.ts b/assets/script/game/hero/BuffComp.ts index 09aa7a50..0f561a75 100644 --- a/assets/script/game/hero/BuffComp.ts +++ b/assets/script/game/hero/BuffComp.ts @@ -1,4 +1,4 @@ -import { _decorator, Component, instantiate, Label, Node, Prefab, ProgressBar, tween, v3, Vec3 } from 'cc'; +import { _decorator, Component, instantiate, Label, Node, Prefab, ProgressBar, tween, UITransform, v3, Vec3 } from 'cc'; import { oops } from 'db://oops-framework/core/Oops'; import { ecs } from 'db://oops-framework/libs/ecs/ECS'; import { Tooltip } from '../skills/Tooltip'; @@ -48,6 +48,8 @@ export class BuffComp extends Component { this.HeroView=this.node.getComponent(HeroViewComp) this.FIGHTCON=this.node.parent.getComponent(FightConComp) this.top_node = this.node.getChildByName("top"); + let hp_y=this.node.getComponent(UITransform).height+20 + this.top_node.setPosition(0,hp_y,0) // this.top_node.getChildByName("hp").active=(this.node.getComponent(HeroViewComp).fac == 1 ? true : false) this.vmdata_update() diff --git a/assets/script/game/map/MissionMonComp.ts b/assets/script/game/map/MissionMonComp.ts index 8126c586..f1ad6026 100644 --- a/assets/script/game/map/MissionMonComp.ts +++ b/assets/script/game/map/MissionMonComp.ts @@ -29,7 +29,7 @@ export class MissionMonCompComp extends CCComp { buffData?: any[] // 使用BuffAttr格式的buff数据 }> = []; private isSpawning: boolean = false;// 是否正在生成怪物 - private spawnInterval: number = 2; // 每个怪物生成间隔时间 + private spawnInterval: number = 0.5; // 每个怪物生成间隔时间 private spawnTimer: number = 0; // 生成计时器 private is_fight:boolean = false; @@ -105,10 +105,9 @@ export class MissionMonCompComp extends CCComp { // 为每个怪物组生成指定数量的怪物 for (let i = 0; i < count; i++) { // 随机选择位置 (0-9) - let x=i%3 //0 1 2 this.addToSpawnQueueWithAffixes( uuid, - x, + i, isBoss || false, monsterLevel, affixes, @@ -189,10 +188,9 @@ export class MissionMonCompComp extends CCComp { lv: number = 1, buffData?: any[] ) { - let x=RandomManager.instance.getRandomInt(0,2) let mon = ecs.getEntity(Monster); let scale = -1; - let pos: Vec3 = v3(MonSet[x].pos); + let pos: Vec3 = v3(MonSet[i].pos); // 生成怪物,传递词条buff数据 mon.load(pos, scale, uuid, is_boss, is_call, lv, buffData);