From 3b2a6bb9047cfce9f501593b3669a9c1af6c5df4 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期三, 05 十一月 2025 17:40:23 +0800
Subject: [PATCH] 130 战斗修改回合样式
---
Main/System/Battle/BattleObject/BattleObjectFactory.cs | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/Main/System/Battle/BattleObject/BattleObjectFactory.cs b/Main/System/Battle/BattleObject/BattleObjectFactory.cs
index 9a4d010..d40f987 100644
--- a/Main/System/Battle/BattleObject/BattleObjectFactory.cs
+++ b/Main/System/Battle/BattleObject/BattleObjectFactory.cs
@@ -9,8 +9,19 @@
// 鏈剰鏄鍦ㄨ繖閲屽仛姹犵殑鍐呭鐨� 浣嗘槸鎯充簡涓�涓� 鍒╃敤鏁堢巼鏈夌偣宸� 鏈�澶氬仛涓�涓嬬孩鑹叉柟鐨勭紦瀛� 钃濊壊鏂圭殑鍗虫椂鐢� 鍗虫椂鍒犻櫎 鎴栬�呯紦瀛樹笂涓�娆℃垬鏂楃殑灏辫
// private static int AutoIncrementID = 100000;
- private static float modelScaleRate => float.Parse(FuncConfigConfig.Get("BattleModelScale").Numerical1);
+ private static float m_modelScaleRate = 0f;
+ public static float modelScaleRate
+ {
+ get
+ {
+ if (m_modelScaleRate <= 0f)
+ {
+ m_modelScaleRate = float.Parse(FuncConfigConfig.Get("BattleModelScale").Numerical1);
+ }
+ return m_modelScaleRate;
+ }
+ }
// 杩欓噷鎶ラ敊浜嗘鏌ヤ竴涓�
public static BattleObject CreateBattleObject(BattleField _battleField, List<GameObject> posNodeList, TeamHero teamHero, BattleCamp _Camp)
{
@@ -30,7 +41,7 @@
battleObject.ObjID = teamHero.ObjID;
GameObject realGO = GameObject.Instantiate(battleGO, goParent.transform);
- SkeletonGraphic skeletonGraphic = realGO.GetComponentInChildren<SkeletonGraphic>(true);
+ SkeletonAnimation skeletonAnimation = realGO.GetComponentInChildren<SkeletonAnimation>(true);
var skeletonDataAsset = ResManager.Instance.LoadAsset<SkeletonDataAsset>("Hero/SpineRes/", skinCfg.SpineRes);
if (skeletonDataAsset == null)
@@ -42,8 +53,8 @@
float finalScaleRate = modelScaleRate * teamHero.modelScale;
- skeletonGraphic.skeletonDataAsset = skeletonDataAsset;
- skeletonGraphic.Initialize(true);
+ skeletonAnimation.skeletonDataAsset = skeletonDataAsset;
+ skeletonAnimation.Initialize(true);
realGO.name = battleObject.ObjID.ToString();
realGO.transform.localScale = new Vector3(finalScaleRate, finalScaleRate, finalScaleRate);
RectTransform rectTrans = realGO.GetComponent<RectTransform>();
--
Gitblit v1.8.0