bug修复

1.修复了部分会导致船只出现在陆地的bug
2.修复了部分会导致已经死亡的单位图像错误残留的bug
3.修复了[车]职阶英雄在敌方城市中心能获得要塞防御加成的bug
4.修复了[车]职阶英雄在被动移动时也会产生溅射伤害的bug
5.修复了移动溅射在被动移动(如被挤开)也会生效的bug,完善了描述
6.修复了勇仪推人致死结果贴图错误
7.修复了洩矢诹访子创造御射宫司大人时会重置和平奇观计数的bug
8.优化了顶部信息栏金币显示排版问题
9.优化了多个窗口重叠时,快捷键“右键”及"Esc"关闭窗口的顺序
10.修复了间谍攻击隐身单位占据的城市中心时出错(反复播放攻击动画)的bug
11.修复了城墙建造后城市中心的单位没有立刻刷新状态的bug
This commit is contained in:
daixiawu 2026-06-07 00:15:12 +08:00
parent 70cc40a475
commit 491503a06d
15 changed files with 3200 additions and 2950 deletions

View File

@ -1,5 +1,5 @@
{ {
"nextId": 317, "nextId": 318,
"bugs": [ "bugs": [
{ {
"id": 2, "id": 2,
@ -3139,12 +3139,12 @@
"id": 312, "id": 312,
"title": "@天火人雪糕 青蛙子丢蛇会打断和平奇观", "title": "@天火人雪糕 青蛙子丢蛇会打断和平奇观",
"description": "", "description": "",
"status": "open", "status": "fixed",
"priority": "medium", "priority": "medium",
"module": "", "module": "",
"longTerm": false, "longTerm": false,
"createdAt": 1780589231908, "createdAt": 1780589231908,
"updatedAt": 1780589231908 "updatedAt": 1780760899491
}, },
{ {
"id": 313, "id": 313,
@ -3189,6 +3189,17 @@
"longTerm": false, "longTerm": false,
"createdAt": 1780654816747, "createdAt": 1780654816747,
"updatedAt": 1780654816747 "updatedAt": 1780654816747
},
{
"id": 317,
"title": "船乘风可以跨过陆地到对面水体",
"description": "",
"status": "open",
"priority": "medium",
"module": "",
"longTerm": false,
"createdAt": 1780759209548,
"updatedAt": 1780759209548
} }
] ]
} }

View File

@ -358,7 +358,7 @@ MonoBehaviour:
- SkillType: 19 - SkillType: 19
SkillViewType: 0 SkillViewType: 0
SkillName: "\u79FB\u52A8\u6E85\u5C04" SkillName: "\u79FB\u52A8\u6E85\u5C04"
SkillDesc: "\u79FB\u52A8\u65F6\uFF0C\u5BF9\u5468\u56F41\u683C\u8303\u56F4\u9020\u6210\u6E85\u5C04\u4F24\u5BB3\u3002" SkillDesc: "**<\u4E3B\u52A8\u79FB\u52A8>**\u6216**<\u653B\u51FB\u79FB\u52A8>**\u65F6\uFF0C\u5BF9\u5468\u56F41\u683C\u8303\u56F4\u9020\u6210\u6E85\u5C04\u4F24\u5BB3\u3002"
NotShow: 0 NotShow: 0
ShowOnUnitMono: 0 ShowOnUnitMono: 0
SkillIcon: {fileID: 21300000, guid: ef51b976984920b4e8601f0f548cd729, type: 3} SkillIcon: {fileID: 21300000, guid: ef51b976984920b4e8601f0f548cd729, type: 3}

View File

@ -1791,32 +1791,36 @@ namespace RuntimeData
// collect 调用 // collect 调用
CollectManager.Instance.OnAddUnitCollect(this, newUnit); CollectManager.Instance.OnAddUnitCollect(this, newUnit);
if (waitTime > 0f) if (IsCurrentShowMap())
{ {
var tmpUnit = newUnit; if (waitTime > 0f)
Timer.Instance.TimerRegister(this, () => {
var tmpUnit = newUnit;
MapRenderer.Instance?.RenderUpdateUnitMap(showoffNewUnit: false);
Timer.Instance.TimerRegister(this, () =>
{
//新增renderer
MapRenderer.Instance?.RenderUpdateUnitMap();
//看情况是否显示,是否播放雾效
if(tmpUnit.Renderer(this)?.InstantUpdateUnit(true)??false)
tmpUnit.Grid(Main.MapData)?.Renderer(Main.MapData)?.PlayVFXInSight(new GridVFXParams(GridVFXType.Fog));
//刷新所属城市的CityInfo人口数变化
if (CityMap.GetCityById(cid, out var cityData))
cityData.CityInfoRenderer(this)?.InstantUpdateCityInfo();
},waitTime,"REISEN ILLUSION ADDUNITDATA");
}
else
{ {
//新增renderer //新增renderer
MapRenderer.Instance.RenderUpdateUnitMap(); MapRenderer.Instance?.RenderUpdateUnitMap();
//看情况是否显示,是否播放雾效 //看情况是否显示,是否播放雾效
if(tmpUnit.Renderer(this)?.InstantUpdateUnit(true)??false) if(newUnit.Renderer(this)?.InstantUpdateUnit(true)??false)
tmpUnit.Grid(Main.MapData)?.Renderer(Main.MapData)?.PlayVFXInSight(new GridVFXParams(GridVFXType.Fog)); newUnit.Grid(Main.MapData)?.Renderer(Main.MapData)?.PlayVFXInSight(new GridVFXParams(GridVFXType.Fog));
//刷新所属城市的CityInfo人口数变化 //刷新所属城市的CityInfo人口数变化
if (CityMap.GetCityById(cid, out var cityData)) if (CityMap.GetCityById(cid, out var cityData))
cityData.CityInfoRenderer(this)?.InstantUpdateCityInfo(); cityData.CityInfoRenderer(this)?.InstantUpdateCityInfo();
},waitTime,"REISEN ILLUSION ADDUNITDATA"); }
}
else
{
//新增renderer
MapRenderer.Instance.RenderUpdateUnitMap();
//看情况是否显示,是否播放雾效
if(newUnit.Renderer(this)?.InstantUpdateUnit(true)??false)
newUnit.Grid(Main.MapData)?.Renderer(Main.MapData)?.PlayVFXInSight(new GridVFXParams(GridVFXType.Fog));
//刷新所属城市的CityInfo人口数变化
if (CityMap.GetCityById(cid, out var cityData))
cityData.CityInfoRenderer(this)?.InstantUpdateCityInfo();
} }
if (GetPlayerDataByUnitId(newUnit.Id, out var playerData)) if (GetPlayerDataByUnitId(newUnit.Id, out var playerData))

View File

@ -1062,8 +1062,15 @@ namespace Logic.Action
actionParams.PlayerData.SpendCoin(GetCost(actionParams)); actionParams.PlayerData.SpendCoin(GetCost(actionParams));
actionParams.CityData.CityWall = true; actionParams.CityData.CityWall = true;
var cityGrid = actionParams.CityData.Grid(actionParams.MapData);
actionParams.CityData.SetCityRenderer(actionParams.MapData); actionParams.CityData.SetCityRenderer(actionParams.MapData);
actionParams.CityData.Grid(actionParams.MapData)?.Renderer(actionParams.MapData)?.InstantUpdateGrid(true); cityGrid?.Renderer(actionParams.MapData)?.InstantUpdateGrid(true);
if (actionParams.MapData == Main.MapData
&& (cityGrid?.InMainSight() ?? false)
&& cityGrid.MainSelfPlayerVisibleUnit(out var unit))
{
unit.Renderer(actionParams.MapData)?.RenderUpdateUnitDefense();
}
return true; return true;
} }
@ -2310,11 +2317,17 @@ namespace Logic.Action
internal static class ActiveAttackActionRecorder internal static class ActiveAttackActionRecorder
{ {
public static void MarkStarted(MapData mapData, PlayerData player)
{
if (mapData == null || player == null) return;
player.TurnNoAttack = 0;
}
public static void MarkStarted(MapData mapData, UnitData unit) public static void MarkStarted(MapData mapData, UnitData unit)
{ {
if (mapData == null || unit == null) return; if (mapData == null || unit == null) return;
var player = unit.Player(mapData); var player = unit.Player(mapData);
if (player != null) player.TurnNoAttack = 0; MarkStarted(mapData, player);
} }
} }
@ -2547,23 +2560,25 @@ namespace Logic.Action
//Step #1 处理所有攻击友军的逻辑 //Step #1 处理所有攻击友军的逻辑
UnitData unit1 = actionParams.UnitData; UnitData unit1 = actionParams.UnitData;
ActiveAttackActionRecorder.MarkStarted(actionParams.MapData, unit1);
//UnitData unit2 = actionParams.TargetUnitData; //UnitData unit2 = actionParams.TargetUnitData;
CityData city1 = unit1.City(actionParams.MapData); CityData city1 = unit1.City(actionParams.MapData);
//MapData mapData = actionParams.MapData; //MapData mapData = actionParams.MapData;
SkillType animSkillData = SkillType.NONE; SkillType animSkillData = SkillType.NONE;
UnitData suwakoUnit = null; UnitData suwakoUnit = null;
bool hasSuwakoAttack = unit1.GetSkill(SkillType.SUWAKOATTACK, out var _);
//处理SUWAKO的地面攻击 //处理SUWAKO的地面攻击
if (unit1.GetSkill(SkillType.SUWAKOATTACK, out var _)) if (hasSuwakoAttack)
{ {
animSkillData = SkillType.SUWAKOATTACK; animSkillData = SkillType.SUWAKOATTACK;
if (targetGrid.RealUnit(actionParams.MapData, out var targetGridUnit)) if (targetGrid.RealUnit(actionParams.MapData, out var targetGridUnit))
{ {
ActiveAttackActionRecorder.MarkStarted(actionParams.MapData, unit1);
targetGridUnit.OnBeInteractTarget(actionParams.MapData, unit1, targetGrid); targetGridUnit.OnBeInteractTarget(actionParams.MapData, unit1, targetGrid);
return true; return true;
} }
// Suwako 对空地生成白蛇不是攻击,不能重置和平奇观的无攻击回合计数。
unit1.ClearActionPoint(); unit1.ClearActionPoint();
var fullType = new UnitFullType() var fullType = new UnitFullType()
{ UnitType = UnitType.MoriyaHebi, GiantType = GiantType.None, UnitLevel = 1 }; { UnitType = UnitType.MoriyaHebi, GiantType = GiantType.None, UnitLevel = 1 };
@ -2572,12 +2587,18 @@ namespace Logic.Action
if (!actionParams.MapData.AddUnitData(targetGrid.Id, city1.Id, fullType, out suwakoUnit, 0.2f)) if (!actionParams.MapData.AddUnitData(targetGrid.Id, city1.Id, fullType, out suwakoUnit, 0.2f))
return false; return false;
} }
else
{
ActiveAttackActionRecorder.MarkStarted(actionParams.MapData, unit1);
}
//处理 INFILTRATE 的地面攻击:渗透单位攻击敌方空城心 → 直接偷金 + 自杀 + 生叛军跳过远程攻击Bomb动画 //处理 INFILTRATE 的地面攻击:渗透单位攻击敌方空城心 → 直接偷金 + 自杀 + 生叛军跳过远程攻击Bomb动画
bool infiltrateConsumed = false; bool infiltrateConsumed = false;
if (unit1.GetSkill(SkillType.INFILTRATE, out var infSkillBase) && infSkillBase is InfiltrateSkill infSkill) if (unit1.GetSkill(SkillType.INFILTRATE, out var infSkillBase) && infSkillBase is InfiltrateSkill infSkill)
{ {
infiltrateConsumed = infSkill.PerformInfiltrateOnAttackGround(actionParams.MapData, unit1, targetGrid); infiltrateConsumed = infSkill.PerformInfiltrateOnAttackGround(actionParams.MapData, unit1, targetGrid);
if (infiltrateConsumed)
ActiveAttackActionRecorder.MarkStarted(actionParams.MapData, actionParams.PlayerData);
} }
//Step #3 处理动画 //Step #3 处理动画

View File

@ -84,6 +84,28 @@ namespace Logic
{ {
inputLock = false; inputLock = false;
} }
private bool IsCancelShortcutDown()
{
return Input.GetKeyDown(KeyCode.Escape) || Input.GetMouseButtonDown(1);
}
private bool TryHandleCancelShortcut(bool allowPresentationClose)
{
if (HeroHintPanel.IsPinned)
{
EventManager.Publish(new HideHeroHintPanelEvent { Force = true });
return true;
}
if (UIManager.Instance?.UIInfoManager != null &&
UIManager.Instance.UIInfoManager.TryHandleCurTaskByEsc())
{
return true;
}
return allowPresentationClose && PresentationManager.TryCloseCurrentByEsc();
}
public void Update() public void Update()
{ {
@ -94,7 +116,7 @@ namespace Logic
{ {
UIChatAreaMono.SendOrClose(); UIChatAreaMono.SendOrClose();
} }
else if (Input.GetKeyDown(KeyCode.Escape) || Input.GetMouseButtonDown(1)) else if (IsCancelShortcutDown())
{ {
UIChatAreaMono.HideInputArea(); UIChatAreaMono.HideInputArea();
} }
@ -128,17 +150,9 @@ namespace Logic
} }
//允许Esc/右键关闭已打开的信息面板 //允许Esc/右键关闭已打开的信息面板
if (Input.GetKeyDown(KeyCode.Escape) || Input.GetMouseButtonDown(1)) if (IsCancelShortcutDown())
{ {
if (HeroHintPanel.IsPinned) TryHandleCancelShortcut(false);
{
EventManager.Publish(new HideHeroHintPanelEvent { Force = true });
return;
}
if (UIManager.Instance?.UIInfoManager != null)
{
UIManager.Instance.UIInfoManager.TryCloseCurTaskByEsc();
}
} }
return; return;
@ -147,9 +161,9 @@ namespace Logic
//如果PresentationManager正在播放则只考虑相应UI Esc 和右键交互 //如果PresentationManager正在播放则只考虑相应UI Esc 和右键交互
if (PresentationManager.Busy) if (PresentationManager.Busy)
{ {
if (Input.GetKeyDown(KeyCode.Escape) || Input.GetMouseButtonDown(1)) if (IsCancelShortcutDown())
{ {
if (PresentationManager.TryCloseCurrentByEsc()) if (TryHandleCancelShortcut(true))
{ {
return; return;
} }
@ -354,21 +368,11 @@ namespace Logic
return; return;
} }
if (Input.GetKeyDown(KeyCode.Escape) || Input.GetMouseButtonDown(1)) if (IsCancelShortcutDown())
{ {
// 优先关闭固定的HeroHintPanel if (TryHandleCancelShortcut(false))
if (HeroHintPanel.IsPinned)
{ {
EventManager.Publish(new HideHeroHintPanelEvent { Force = true }); return; // 成功关闭UI不再执行其他Escape逻辑
return;
}
// 优先检查UIInfoManager是否有可关闭的界面
if (UIManager.Instance?.UIInfoManager != null)
{
if (UIManager.Instance.UIInfoManager.TryCloseCurTaskByEsc())
{
return; // 成功关闭UI不再执行其他Escape逻辑
}
} }
} }

View File

@ -28,7 +28,13 @@ namespace Logic.Skill
if (!mapData.GetGridDataByUnitId(self.Id, out var grid)) if (!mapData.GetGridDataByUnitId(self.Id, out var grid))
return 1f; return 1f;
if (mapData.GetCityDataByGid(grid.Id, out var city)) if (mapData.GetCityDataByGid(grid.Id, out var city))
return city.CityWall ? 4f : 1.5f; {
if (!city.CityWall) return 1.5f;
if (!mapData.GetPlayerDataByCityId(city.Id, out var cityPlayer) ||
!mapData.GetPlayerDataByUnitId(self.Id, out var unitPlayer))
return 1.5f;
return mapData.SameUnion(cityPlayer.Id, unitPlayer.Id) ? 4f : 1.5f;
}
if (grid.Resource == ResourceType.NavalBase || grid.Resource == ResourceType.Military || if (grid.Resource == ResourceType.NavalBase || grid.Resource == ResourceType.Military ||
grid.Resource == ResourceType.RemiliaMilitary) grid.Resource == ResourceType.RemiliaMilitary)
return 1.5f; return 1.5f;

View File

@ -38,6 +38,7 @@ namespace Logic.Skill
public override void OnMove(UnitData self, GridData grid, MapData mapData, MoveType moveType, List<Vector2Int> path = null) public override void OnMove(UnitData self, GridData grid, MapData mapData, MoveType moveType, List<Vector2Int> path = null)
{ {
if (mapData == null || self == null || grid == null) return; if (mapData == null || self == null || grid == null) return;
if (moveType == MoveType.PassiveMove) return;
if (!self.IsValidOnMap(mapData, grid)) return; if (!self.IsValidOnMap(mapData, grid)) return;
if (!mapData.GetPlayerDataByUnitId(self.Id, out var selfPlayer)) return; if (!mapData.GetPlayerDataByUnitId(self.Id, out var selfPlayer)) return;

View File

@ -147,7 +147,7 @@ namespace Logic.Skill
outPushed = false; outPushed = false;
outAttackDmg = actualDmg; outAttackDmg = actualDmg;
var cDmg = Table.Instance.CalcCounterDamage(map, self, target); var cDmg = Table.Instance.CalcCounterDamage(map, self, target);
bool canCounter = Main.UnitLogic.CanCounter(map, self, target); bool canCounter = Main.UnitLogic.CanCounterByRules(map, self, target);
Main.UnitLogic.DamageSettlement(map, self, target, actualDmg, DamageType.PushAttack); Main.UnitLogic.DamageSettlement(map, self, target, actualDmg, DamageType.PushAttack);
if (target.IsAlive() && self.IsAlive() && canCounter) if (target.IsAlive() && self.IsAlive() && canCounter)
{ {
@ -197,6 +197,10 @@ namespace Logic.Skill
} }
} }
} }
else if (!target.IsAlive())
{
outFragmentType = FragmentType.NotMoveKill;
}
} }
return true; return true;
} }

View File

@ -280,16 +280,14 @@ namespace Logic
return true; return true;
} }
//返回unit2是否能反击unit1 //返回unit2是否满足反击unit1的基础规则不包含"本次攻击是否会杀死unit2"的预判。
public bool CanCounter(MapData mapData, UnitData unit1, UnitData unit2) public bool CanCounterByRules(MapData mapData, UnitData unit1, UnitData unit2)
{ {
if (!unit2.CanAttackAll(mapData) && mapData.IsLeagueUnitByUnit(unit1.Id, unit2.Id)) return false; if (!unit2.CanAttackAll(mapData) && mapData.IsLeagueUnitByUnit(unit1.Id, unit2.Id)) return false;
if (!mapData.GetPlayerDataByUnitId(unit1.Id, out var player1)) return false; if (!mapData.GetPlayerDataByUnitId(unit1.Id, out var player1)) return false;
if (!mapData.GetPlayerDataByUnitId(unit2.Id, out var player2)) return false; if (!mapData.GetPlayerDataByUnitId(unit2.Id, out var player2)) return false;
if (!mapData.GetGridDataByUnitId(unit1.Id, out var grid1)) return false; if (!mapData.GetGridDataByUnitId(unit1.Id, out var grid1)) return false;
if (!mapData.GetGridDataByUnitId(unit2.Id, out var grid2)) return false; if (!mapData.GetGridDataByUnitId(unit2.Id, out var grid2)) return false;
// 计算攻击伤害
int dmg1 = Table.Instance.CalcDamage(mapData, unit1, unit2);
//设置unit1 attackendermark和相关参数 //设置unit1 attackendermark和相关参数
@ -313,10 +311,20 @@ namespace Logic
if (Table.Instance.CalcDistance(new Vector2Int(grid1.Pos.X,grid1.Pos.Y),new Vector2Int(grid2.Pos.X,grid2.Pos.Y)) if (Table.Instance.CalcDistance(new Vector2Int(grid1.Pos.X,grid1.Pos.Y),new Vector2Int(grid2.Pos.X,grid2.Pos.Y))
> unit2.GetAttackRange(mapData)) > unit2.GetAttackRange(mapData))
canCounter = false; canCounter = false;
return canCounter;
}
//返回unit2是否能反击unit1。对外查询保留致死预判真实攻击执行会在结算后按存活状态决定。
public bool CanCounter(MapData mapData, UnitData unit1, UnitData unit2)
{
if (!CanCounterByRules(mapData, unit1, unit2)) return false;
// 计算攻击伤害
int dmg1 = Table.Instance.CalcDamage(mapData, unit1, unit2);
if (dmg1 >= unit2.Health) //如果伤害直接够杀死对方 if (dmg1 >= unit2.Health) //如果伤害直接够杀死对方
canCounter = false; return false;
return canCounter; return true;
} }
public void Attack(MapData mapData, UnitData unit1, UnitData unit2, out int attackDmg,out int counterDmg,out FragmentType fragmentType) public void Attack(MapData mapData, UnitData unit1, UnitData unit2, out int attackDmg,out int counterDmg,out FragmentType fragmentType)
@ -380,7 +388,7 @@ namespace Logic
attackDmg += dmg1; attackDmg += dmg1;
//判断对方能否反击的参数 //判断对方能否反击的参数
//TODO 之后还是要把这些放到后面逻辑里去写,不要在最开头判断,一定判断不出来的 //TODO 之后还是要把这些放到后面逻辑里去写,不要在最开头判断,一定判断不出来的
bool canCounter = CanCounter(mapData,unit1,unit2); bool canCounter = CanCounterByRules(mapData,unit1,unit2);
if(unit1.UnitFullType.UnitType == UnitType.Minder)canCounter = false; if(unit1.UnitFullType.UnitType == UnitType.Minder)canCounter = false;
//攻击会消耗所有类别的行动点数 //攻击会消耗所有类别的行动点数

View File

@ -434,7 +434,7 @@ namespace TH1Renderer
} }
//当unitMap出现新的对象时新建对象 //当unitMap出现新的对象时新建对象
public void RenderUpdateUnitMap() public void RenderUpdateUnitMap(bool showoffNewUnit = true)
{ {
foreach (var unitData in Main.MapData.UnitMap.UnitList) foreach (var unitData in Main.MapData.UnitMap.UnitList)
{ {
@ -448,7 +448,10 @@ namespace TH1Renderer
continue; continue;
ROUnitMap[unitData.Id] = unitRenderer; ROUnitMap[unitData.Id] = unitRenderer;
//立刻更新每个unit的视觉 //立刻更新每个unit的视觉
unitRenderer.InstantUpdateUnit(true); if (showoffNewUnit)
unitRenderer.InstantUpdateUnit(true);
else
unitRenderer.InstantDisappear();
} }
} }
} }

View File

@ -101,6 +101,11 @@ namespace TH1_UI.Core
closable.CancelMapHighlightsOrDoNothing(); closable.CancelMapHighlightsOrDoNothing();
} }
public bool IsShow()
{
return _viewController?.IsShow() ?? false;
}
} }
public class UIInfoManager public class UIInfoManager
@ -153,6 +158,19 @@ namespace TH1_UI.Core
return true; return true;
} }
/// <summary>
/// 尝试由当前InfoUI处理Esc/右键。
/// 返回true表示本次快捷键已被Info层消费即使只是关闭了Info内部子窗口。
/// </summary>
public bool TryHandleCurTaskByEsc()
{
if (_task == null) return false;
if (!_task.CanCloseByEsc()) return _task.IsShow();
_task.CancelMapHighlights(); // 先取消地图高亮
_task.Close();
return true;
}
public void OnChoiceHeroInfo() public void OnChoiceHeroInfo()
{ {
@ -191,4 +209,4 @@ namespace TH1_UI.Core
} }
} }
} }

View File

@ -63,8 +63,7 @@ namespace TH1_UI.View.Top
{ {
UpdateAllInstant(); UpdateAllInstant();
// 首次SetContent时强制重建布局确保所有Panel的位置和大小正确 // 首次SetContent时强制重建布局确保所有Panel的位置和大小正确
if (FatherPanel != null) RebuildCoinPanelLayout();
LayoutRebuilder.ForceRebuildLayoutImmediate(FatherPanel);
} }
public void UpdateAllInstant() public void UpdateAllInstant()
@ -79,11 +78,12 @@ namespace TH1_UI.View.Top
PerfectTime.SetActive(Main.MapData.MapConfig.GameMode == GameMode.PERFECT); PerfectTime.SetActive(Main.MapData.MapConfig.GameMode == GameMode.PERFECT);
Turn.text = (Main.MapData.PlayerMap.SelfPlayerData.Turn + 1).ToString(); Turn.text = (Main.MapData.PlayerMap.SelfPlayerData.Turn + 1).ToString();
Faith.text = Main.MapData.PlayerMap.SelfPlayerData.PlayerScore.ToString(); Faith.text = Main.MapData.PlayerMap.SelfPlayerData.PlayerScore.ToString();
Coin.text = Main.MapData.PlayerMap.SelfPlayerData.PlayerCoin.ToString(); SetCoinText(Main.MapData.PlayerMap.SelfPlayerData.PlayerCoin);
CoinPerTurn.text = CoinPerTurn.text =
"<color=yellow>" + "<color=yellow>" +
Main.PlayerLogic.GetPlayerCoinPerTurn(Main.MapData,Main.MapData.PlayerMap.SelfPlayerData.Id) Main.PlayerLogic.GetPlayerCoinPerTurn(Main.MapData,Main.MapData.PlayerMap.SelfPlayerData.Id)
+ "</color>"; + "</color>";
RebuildCoinPanelLayout();
var techPerTurn = var techPerTurn =
Main.PlayerLogic.GetPlayerTechPointPerTurn(Main.MapData, Main.MapData.PlayerMap.SelfPlayerData.Id); Main.PlayerLogic.GetPlayerTechPointPerTurn(Main.MapData, Main.MapData.PlayerMap.SelfPlayerData.Id);
@ -239,7 +239,7 @@ namespace TH1_UI.View.Top
} }
if (time == 0) if (time == 0)
{ {
targetText.text = targetValue.ToString(); SetTopBarAnimText(targetText, targetValue, panelType);
return; return;
} }
if (panelType == TopBarPanelType.Coin) if (panelType == TopBarPanelType.Coin)
@ -269,12 +269,12 @@ namespace TH1_UI.View.Top
Timer.Instance.TimerRegister(this, () => Timer.Instance.TimerRegister(this, () =>
{ {
if (animVersion != _topBarAnimVersion) return; if (animVersion != _topBarAnimVersion) return;
text.text = tmp.ToString(); SetTopBarAnimText(text, tmp, panel);
if (finalCheck) if (finalCheck)
{ {
if(panel == TopBarPanelType.Coin && Main.MapData != null) if(panel == TopBarPanelType.Coin && Main.MapData != null)
{ {
text.text = Main.MapData.PlayerMap.SelfPlayerData.PlayerCoin.ToString(); SetTopBarAnimText(text, Main.MapData.PlayerMap.SelfPlayerData.PlayerCoin, panel);
_coinAnimActive = false; _coinAnimActive = false;
} }
} }
@ -302,13 +302,53 @@ namespace TH1_UI.View.Top
var realCoin = Main.MapData.PlayerMap.SelfPlayerData.PlayerCoin; var realCoin = Main.MapData.PlayerMap.SelfPlayerData.PlayerCoin;
if (int.TryParse(Coin.text, out var showCoin) && showCoin == realCoin) return; if (int.TryParse(Coin.text, out var showCoin) && showCoin == realCoin) return;
CancelTopBarAnim(); CancelTopBarAnim();
Coin.text = realCoin.ToString(); SetCoinText(realCoin);
} }
public void UpdateCoinPerTurn() public void UpdateCoinPerTurn()
{ {
if (Main.MapData?.PlayerMap?.SelfPlayerData == null) return; if (Main.MapData?.PlayerMap?.SelfPlayerData == null) return;
CoinPerTurn.text = "<color=yellow>" + Main.PlayerLogic.GetPlayerCoinPerTurn(Main.MapData,Main.MapData.PlayerMap.SelfPlayerData.Id) + "</color>"; CoinPerTurn.text = "<color=yellow>" + Main.PlayerLogic.GetPlayerCoinPerTurn(Main.MapData,Main.MapData.PlayerMap.SelfPlayerData.Id) + "</color>";
RebuildCoinPanelLayout();
}
private void RebuildCoinPanelLayout()
{
RebuildTopBarLayout(
Coin != null ? Coin.rectTransform : null,
CoinPerTurn != null ? CoinPerTurn.rectTransform : null,
CoinTransform as RectTransform);
}
private void SetTopBarAnimText(TextMeshProUGUI targetText, int value, TopBarPanelType panelType)
{
if (panelType == TopBarPanelType.Coin)
{
SetCoinText(value);
return;
}
if (targetText == null) return;
targetText.text = value.ToString();
}
private void SetCoinText(int value)
{
if (Coin == null) return;
Coin.text = value.ToString();
Coin.ForceMeshUpdate();
RebuildTopBarLayout(Coin.rectTransform, CoinTransform as RectTransform);
}
private void RebuildTopBarLayout(params RectTransform[] rebuildRoots)
{
foreach (var root in rebuildRoots)
{
if (root != null)
LayoutRebuilder.ForceRebuildLayoutImmediate(root);
}
if (FatherPanel != null)
LayoutRebuilder.ForceRebuildLayoutImmediate(FatherPanel);
} }

View File

@ -1,7 +1,7 @@
# Graph Report - C:\TH1\TH1\Unity (2026-06-06) # Graph Report - C:\TH1\TH1\Unity (2026-06-06)
## Corpus Check ## Corpus Check
- 9234 files · ~79,160,199 words - 9234 files · ~79,160,260 words
- Verdict: corpus is large enough that graph structure adds value. - Verdict: corpus is large enough that graph structure adds value.
## Summary ## Summary
@ -10799,11 +10799,11 @@ Nodes (1): Data Scientist Example Subagent
_Questions this graph is uniquely positioned to answer:_ _Questions this graph is uniquely positioned to answer:_
- **Why does `NullCheck` connect `Community 3` to `Community 0`, `Community 1`, `Community 2`, `Community 5`, `Community 6`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 14`, `Community 15`, `Community 16`, `Community 17`, `Community 18`, `Community 19`, `Community 20`, `Community 21`, `Community 22`, `Community 23`, `Community 24`, `Community 26`, `Community 27`, `Community 28`, `Community 29`, `Community 30`, `Community 31`, `Community 33`, `Community 34`, `Community 35`, `Community 36`, `Community 37`, `Community 38`, `Community 40`, `Community 41`, `Community 42`, `Community 43`, `Community 44`, `Community 45`, `Community 47`, `Community 48`, `Community 50`, `Community 51`, `Community 52`, `Community 53`, `Community 54`, `Community 55`, `Community 56`, `Community 57`, `Community 58`, `Community 59`, `Community 60`, `Community 61`, `Community 62`, `Community 63`, `Community 64`, `Community 65`, `Community 66`, `Community 67`, `Community 68`, `Community 69`, `Community 70`, `Community 71`, `Community 72`, `Community 73`, `Community 74`, `Community 75`, `Community 76`, `Community 79`, `Community 80`, `Community 82`, `Community 83`, `Community 84`, `Community 85`, `Community 86`, `Community 87`, `Community 88`, `Community 95`, `Community 98`, `Community 114`, `Community 134`, `Community 176`, `Community 282`?** - **Why does `NullCheck` connect `Community 3` to `Community 0`, `Community 1`, `Community 2`, `Community 5`, `Community 6`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 14`, `Community 15`, `Community 16`, `Community 17`, `Community 18`, `Community 19`, `Community 20`, `Community 21`, `Community 22`, `Community 23`, `Community 24`, `Community 26`, `Community 27`, `Community 28`, `Community 29`, `Community 30`, `Community 31`, `Community 33`, `Community 34`, `Community 35`, `Community 36`, `Community 37`, `Community 38`, `Community 40`, `Community 41`, `Community 42`, `Community 43`, `Community 44`, `Community 45`, `Community 47`, `Community 48`, `Community 50`, `Community 51`, `Community 52`, `Community 53`, `Community 54`, `Community 55`, `Community 56`, `Community 57`, `Community 58`, `Community 59`, `Community 60`, `Community 61`, `Community 62`, `Community 63`, `Community 64`, `Community 65`, `Community 66`, `Community 67`, `Community 68`, `Community 69`, `Community 70`, `Community 71`, `Community 72`, `Community 73`, `Community 74`, `Community 75`, `Community 76`, `Community 79`, `Community 80`, `Community 82`, `Community 83`, `Community 84`, `Community 85`, `Community 86`, `Community 87`, `Community 88`, `Community 95`, `Community 98`, `Community 114`, `Community 134`, `Community 176`, `Community 282`?**
_High betweenness centrality (0.487) - this node is a cross-community bridge._ _High betweenness centrality (0.469) - this node is a cross-community bridge._
- **Why does `InvalidOperationException__ctor_mE4CB6F4712AB6D99A2358FBAE2E052B3EE976162()` connect `Community 6` to `Community 1`, `Community 3`, `Community 5`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 16`, `Community 17`, `Community 18`, `Community 20`, `Community 21`, `Community 22`, `Community 23`, `Community 24`, `Community 26`, `Community 27`, `Community 28`, `Community 29`, `Community 30`, `Community 31`, `Community 34`, `Community 36`, `Community 37`, `Community 40`, `Community 41`, `Community 43`, `Community 44`, `Community 45`, `Community 47`, `Community 50`, `Community 51`, `Community 54`, `Community 55`, `Community 57`, `Community 59`, `Community 60`, `Community 61`, `Community 70`, `Community 72`, `Community 75`, `Community 76`, `Community 85`, `Community 95`?** - **Why does `Type_GetTypeFromHandle_m6062B81682F79A4D6DF2640692EE6D9987858C57()` connect `Community 1` to `Community 2`, `Community 3`, `Community 5`, `Community 6`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 15`, `Community 16`, `Community 17`, `Community 18`, `Community 20`, `Community 22`, `Community 24`, `Community 26`, `Community 27`, `Community 28`, `Community 29`, `Community 30`, `Community 31`, `Community 35`, `Community 36`, `Community 37`, `Community 38`, `Community 40`, `Community 41`, `Community 48`, `Community 50`, `Community 51`, `Community 54`, `Community 57`, `Community 59`, `Community 60`, `Community 61`, `Community 62`, `Community 65`, `Community 69`, `Community 70`, `Community 71`, `Community 72`, `Community 75`, `Community 76`, `Community 79`, `Community 80`, `Community 82`, `Community 84`, `Community 85`, `Community 86`, `Community 95`?**
_High betweenness centrality (0.020) - this node is a cross-community bridge._ _High betweenness centrality (0.027) - this node is a cross-community bridge._
- **Why does `Object__ctor_mE837C6B9FA8C6D5D109F4B2EC885D79919AC0EA2()` connect `Community 6` to `Community 1`, `Community 2`, `Community 3`, `Community 5`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 14`, `Community 15`, `Community 16`, `Community 17`, `Community 18`, `Community 20`, `Community 21`, `Community 22`, `Community 24`, `Community 26`, `Community 27`, `Community 28`, `Community 29`, `Community 30`, `Community 31`, `Community 33`, `Community 34`, `Community 35`, `Community 36`, `Community 37`, `Community 38`, `Community 40`, `Community 41`, `Community 43`, `Community 45`, `Community 48`, `Community 50`, `Community 51`, `Community 52`, `Community 53`, `Community 54`, `Community 56`, `Community 57`, `Community 58`, `Community 59`, `Community 60`, `Community 61`, `Community 62`, `Community 63`, `Community 64`, `Community 65`, `Community 66`, `Community 67`, `Community 68`, `Community 69`, `Community 70`, `Community 72`, `Community 73`, `Community 74`, `Community 75`, `Community 76`, `Community 79`, `Community 82`, `Community 83`, `Community 84`, `Community 85`, `Community 86`, `Community 87`, `Community 95`, `Community 98`, `Community 114`?** - **Why does `Object__ctor_mE837C6B9FA8C6D5D109F4B2EC885D79919AC0EA2()` connect `Community 6` to `Community 1`, `Community 2`, `Community 3`, `Community 5`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 14`, `Community 15`, `Community 16`, `Community 17`, `Community 18`, `Community 20`, `Community 21`, `Community 22`, `Community 24`, `Community 26`, `Community 27`, `Community 28`, `Community 29`, `Community 30`, `Community 31`, `Community 33`, `Community 34`, `Community 35`, `Community 36`, `Community 37`, `Community 38`, `Community 40`, `Community 41`, `Community 43`, `Community 45`, `Community 48`, `Community 50`, `Community 51`, `Community 52`, `Community 53`, `Community 54`, `Community 56`, `Community 57`, `Community 58`, `Community 59`, `Community 60`, `Community 61`, `Community 62`, `Community 63`, `Community 64`, `Community 65`, `Community 66`, `Community 67`, `Community 68`, `Community 69`, `Community 70`, `Community 72`, `Community 73`, `Community 74`, `Community 75`, `Community 76`, `Community 79`, `Community 82`, `Community 83`, `Community 84`, `Community 85`, `Community 86`, `Community 87`, `Community 95`, `Community 98`, `Community 114`?**
_High betweenness centrality (0.017) - this node is a cross-community bridge._ _High betweenness centrality (0.025) - this node is a cross-community bridge._
- **Are the 88620 inferred relationships involving `NullCheck` (e.g. with `AnimancerComponent_set_Animator_m6D48D5AFEC5608F1982DDAF26C3512CFE72F2A8D()` and `AnimancerComponent_get_IsPlayableInitialized_mB5A207CBB483E0F77C65DB4AB7615F282E91CD30()`) actually correct?** - **Are the 88620 inferred relationships involving `NullCheck` (e.g. with `AnimancerComponent_set_Animator_m6D48D5AFEC5608F1982DDAF26C3512CFE72F2A8D()` and `AnimancerComponent_get_IsPlayableInitialized_mB5A207CBB483E0F77C65DB4AB7615F282E91CD30()`) actually correct?**
_`NullCheck` has 88620 INFERRED edges - model-reasoned connections that need verification._ _`NullCheck` has 88620 INFERRED edges - model-reasoned connections that need verification._
- **Are the 9079 inferred relationships involving `Object__ctor_mE837C6B9FA8C6D5D109F4B2EC885D79919AC0EA2()` (e.g. with `UnitySourceGeneratedAssemblyMonoScriptTypes_v1__ctor_mE65AE524188091311A3CFBD98187D9F5EC00D8E3()` and `FastComparer__ctor_m651D576617C3EE91A72F9B695130EFBECE6F5DD0()`) actually correct?** - **Are the 9079 inferred relationships involving `Object__ctor_mE837C6B9FA8C6D5D109F4B2EC885D79919AC0EA2()` (e.g. with `UnitySourceGeneratedAssemblyMonoScriptTypes_v1__ctor_mE65AE524188091311A3CFBD98187D9F5EC00D8E3()` and `FastComparer__ctor_m651D576617C3EE91A72F9B695130EFBECE6F5DD0()`) actually correct?**

Binary file not shown.

File diff suppressed because it is too large Load Diff