Compare commits
2 Commits
48b0636d5d
...
38ea7b6d57
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
38ea7b6d57 | ||
|
|
baa66b4ece |
@@ -10,6 +10,7 @@ import { GameScoreStats } from "./config/HeroAttrs";
|
||||
import { mLogger } from "./Logger";
|
||||
import { TalentType } from "./config/TalentSet";
|
||||
import { gameDataSync } from "./GameDataSync";
|
||||
import { FightSet } from "./config/GameSet";
|
||||
|
||||
/**
|
||||
* 用远程数据覆盖本地数据(统一方法)
|
||||
@@ -79,8 +80,8 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
mission_data:{
|
||||
mon_num:0,//怪物数量
|
||||
hero_num:0,//英雄数量
|
||||
hero_max_num:5,//英雄可召唤上限
|
||||
hero_extend_max_num:6,//英雄可拓展上限
|
||||
hero_max_num:FightSet.HERO_MAX_NUM,//英雄可召唤上限
|
||||
hero_extend_max_num:FightSet.HERO_MAX_NUM + 1,//英雄可拓展上限
|
||||
wave_time_num:0,//波次时间
|
||||
in_fight:false,
|
||||
fight_time:0,//战斗时间
|
||||
|
||||
@@ -23,7 +23,7 @@ export enum FightSet {
|
||||
CRIT_DAMAGE=50,//暴击伤害
|
||||
MORE_RC=10,//更多次数 广告获取的次数
|
||||
HEARTPOS=-320,//基地位置
|
||||
HERO_MAX_NUM=5,//英雄最大数量
|
||||
HERO_MAX_NUM=3,//英雄最大数量
|
||||
MERGE_MAX=3, //英雄最大等级
|
||||
MERGE_NEED=2, //英雄升级需要的英雄数
|
||||
// BACK_RANG=30,//后退范围
|
||||
|
||||
11
assets/script/game/common/config/heros.csv.meta
Normal file
11
assets/script/game/common/config/heros.csv.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"importer": "text",
|
||||
"imported": true,
|
||||
"uuid": "54a8544b-ba40-49cd-86f8-61616975fd61",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
11
assets/script/game/common/config/skills.csv.meta
Normal file
11
assets/script/game/common/config/skills.csv.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"ver": "1.0.1",
|
||||
"importer": "text",
|
||||
"imported": true,
|
||||
"uuid": "f1181369-d7bf-401c-8ec5-c5cbc520ff20",
|
||||
"files": [
|
||||
".json"
|
||||
],
|
||||
"subMetas": {},
|
||||
"userData": {}
|
||||
}
|
||||
@@ -49,10 +49,12 @@ interface MoveFacConfig {
|
||||
export class MoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate {
|
||||
/** 近战判定射程(来自 heroSet) */
|
||||
private readonly meleeAttackRange = HeroDisVal[HType.Melee];
|
||||
private readonly heroFrontAnchorX = -50;
|
||||
private readonly monFrontAnchorX = 50;
|
||||
/** 常规同阵营横向最小间距 */
|
||||
private readonly allySpacingX = 65;
|
||||
private readonly heroFrontAnchorX = -100;
|
||||
private readonly monFrontAnchorX = 0;
|
||||
/** 常规同阵营横向最小间距(英雄) */
|
||||
private readonly heroAllySpacingX = 100;
|
||||
/** 常规同阵营横向最小间距(怪物) */
|
||||
private readonly monAllySpacingX = 75;
|
||||
/** 纵向判定为同排的最大 Y 差 */
|
||||
private readonly minSpacingY = 30;
|
||||
/** 渲染层级重排节流,避免每帧排序 */
|
||||
@@ -253,7 +255,8 @@ export class MoveSystem extends ecs.ComblockSystem implements ecs.ISystemUpdate
|
||||
const currAttrs = laneAllies[i].get(HeroAttrsComp);
|
||||
const isPrevBoss = prevAttrs?.is_boss;
|
||||
const isCurrBoss = currAttrs?.is_boss;
|
||||
const spacing = (isPrevBoss || isCurrBoss) ? 100 : this.allySpacingX;
|
||||
const baseSpacing = model.fac === FacSet.MON ? this.monAllySpacingX : this.heroAllySpacingX;
|
||||
const spacing = (isPrevBoss || isCurrBoss) ? 100 : baseSpacing;
|
||||
totalSpacing += spacing;
|
||||
}
|
||||
|
||||
|
||||
@@ -202,8 +202,8 @@ export class MissionCardComp extends CCComp {
|
||||
if (missionData) {
|
||||
missionData.coin = Math.max(0, Math.floor(missionData.coin ?? 0));
|
||||
missionData.hero_num = 0;
|
||||
missionData.hero_max_num = 5;
|
||||
missionData.hero_extend_max_num = 6;
|
||||
missionData.hero_max_num = FightSet.HERO_MAX_NUM;
|
||||
missionData.hero_extend_max_num = FightSet.HERO_MAX_NUM + 1;
|
||||
}
|
||||
this.clearHeroInfoPanels();
|
||||
this.layoutCardSlots();
|
||||
@@ -976,8 +976,8 @@ export class MissionCardComp extends CCComp {
|
||||
public setHeroMaxCount(max: number) {
|
||||
const missionData = this.getMissionData();
|
||||
if (!missionData) return;
|
||||
const min = 5;
|
||||
const limit = Math.max(min, missionData.hero_extend_max_num ?? 6);
|
||||
const min = FightSet.HERO_MAX_NUM;
|
||||
const limit = Math.max(min, missionData.hero_extend_max_num ?? (FightSet.HERO_MAX_NUM + 1));
|
||||
const next = Math.max(min, Math.min(limit, Math.floor(max || min)));
|
||||
if (next === missionData.hero_max_num) return;
|
||||
missionData.hero_max_num = next;
|
||||
@@ -1134,7 +1134,7 @@ export class MissionCardComp extends CCComp {
|
||||
|
||||
private getMissionHeroMaxNum(): number {
|
||||
const missionData = this.getMissionData();
|
||||
return Math.max(5, Math.floor(missionData?.hero_max_num ?? 5));
|
||||
return Math.max(FightSet.HERO_MAX_NUM, Math.floor(missionData?.hero_max_num ?? FightSet.HERO_MAX_NUM));
|
||||
}
|
||||
|
||||
private syncMissionHeroData(count?: number) {
|
||||
|
||||
@@ -55,9 +55,9 @@ export class MissionHeroCompComp extends CCComp {
|
||||
/** 英雄出生时的掉落高度(从空中落到地面的像素差) */
|
||||
private static readonly HERO_DROP_HEIGHT = 260
|
||||
/** 近战英雄起始出生 X 坐标 */
|
||||
private static readonly HERO_SPAWN_START_MELEE_X = -280
|
||||
private static readonly HERO_SPAWN_START_MELEE_X = -320
|
||||
/** 远程(含中程)英雄起始出生 X 坐标 */
|
||||
private static readonly HERO_SPAWN_START_RANGED_X = -280
|
||||
private static readonly HERO_SPAWN_START_RANGED_X = -320
|
||||
|
||||
// ======================== 运行时属性 ========================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user