1.1.0 未驗證

This commit is contained in:
Sahik committed 2026-11-25 16:51:44 +08:00
1 parent 2638c5929d
commit 4a72bd132a
31 files changed
+790 -123

No files matched your search

@@ -50,6 +50,13 @@ public class HitscanWeapon : MonoBehaviour
recoilRandom = new System.Random(RecoilSeed);
}
// 每回合開始時重設 (種子 = 這一回合的 roundSeed,記在 config)
public void ResetRecoilSeed(int seed)
{
RecoilSeed = seed;
recoilRandom = new System.Random(seed);
}
void OnDisable()
{
// 切槍時取消換彈,模型回到原位
@@ -41,6 +41,16 @@ public class WeaponLoadout : MonoBehaviour
else if (Keyboard.current.digit4Key.wasPressedThisFrame) Equip(3);
}
// 每回合開始時由 BotSpawner 呼叫 : 所有槍都重設後座力種子 (不看 Current,因為第一回合時可能還沒 Equip)
public void SetRecoilSeed(int seed)
{
if (weapons == null) return;
foreach (HitscanWeapon w in weapons)
{
if (w != null) w.ResetRecoilSeed(seed);
}
}
void Equip(int index)
{
if (index < 0 || index >= weapons.Length || weapons[index] == null) return;