From 458f344e8303ed060844cc925a328847d3a039c7 Mon Sep 17 00:00:00 2001 From: Joywayer Date: Tue, 12 May 2026 21:50:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Audio/AudioManager.cs | 1 + Assets/Scripts/Combat/ShieldComponent.cs | 4 +- .../Core/Difficulty/IDifficultyService.cs | 2 + .../{Quest => Core/Events}/IRewardTarget.cs | 2 +- .../Events}/IRewardTarget.cs.meta | 0 Assets/Scripts/Core/Save/SaveManager.cs | 1 + .../Scripts/Editor/NavSurfaceBakeShortcut.cs | 27 +++++++++++-- Assets/Scripts/Editor/SceneScaffoldTools.cs | 1 + .../Enemies/AI/BaseGames.Enemies.AI.asmdef | 5 ++- Assets/Scripts/Enemies/AI/ILOSRequester.cs | 27 ------------- .../Scripts/Enemies/AI/ILOSRequester.cs.meta | 11 ------ .../BaseGames.Enemies.Boss.Patterns.asmdef | 2 + .../Scripts/Equipment/Effects/OnHitEffect.cs | 2 +- .../Equipment/Effects/StatModifierEffect.cs | 1 + .../BaseGames.Localization.asmdef | 3 +- .../Localization/LocalizationManager.cs | 8 ++-- Assets/Scripts/Player/PlayerStats.cs | 1 - Assets/Scripts/Quest/BaseGames.Quest.asmdef | 4 +- Assets/Scripts/Quest/IQuestManager.cs | 1 + Assets/Scripts/Spells/BaseGames.Spells.asmdef | 1 + .../AntiSoftlock/AntiSoftlockSystem.cs | 2 +- .../Scripts/Support/BaseGames.Support.asmdef | 3 +- Assets/Scripts/Tutorial/TutorialHintUI.cs | 2 + Assets/Scripts/World/DestructibleTile.cs | 2 + Assets/Scripts/World/HazardZone.cs | 2 + Assets/Scripts/World/Liquid/LiquidZone.cs | 2 + Assets/Settings/PlayerInputActions.cs | 39 +++++++++++++++++++ .../Settings/PlayerInputActions.inputactions | 20 ++++++++++ 28 files changed, 122 insertions(+), 54 deletions(-) rename Assets/Scripts/{Quest => Core/Events}/IRewardTarget.cs (96%) rename Assets/Scripts/{Quest => Core/Events}/IRewardTarget.cs.meta (100%) delete mode 100644 Assets/Scripts/Enemies/AI/ILOSRequester.cs delete mode 100644 Assets/Scripts/Enemies/AI/ILOSRequester.cs.meta diff --git a/Assets/Scripts/Audio/AudioManager.cs b/Assets/Scripts/Audio/AudioManager.cs index b6aa1c4..7645c2a 100644 --- a/Assets/Scripts/Audio/AudioManager.cs +++ b/Assets/Scripts/Audio/AudioManager.cs @@ -1,4 +1,5 @@ using System.Collections; +using System.Collections.Generic; using UnityEngine; using UnityEngine.Audio; using BaseGames.Core; diff --git a/Assets/Scripts/Combat/ShieldComponent.cs b/Assets/Scripts/Combat/ShieldComponent.cs index 4f5de2d..174528b 100644 --- a/Assets/Scripts/Combat/ShieldComponent.cs +++ b/Assets/Scripts/Combat/ShieldComponent.cs @@ -18,7 +18,8 @@ namespace BaseGames.Combat [SerializeField] private VoidEventChannelSO _onShieldRestoredChannel; // 护盾恢复 → 播放恢复 VFX // ── 运行时属性 ──────────────────────────────────────────────────────── - public int MaxShieldHP => _config.MaxShieldHP; + private int _maxShieldHP; + public int MaxShieldHP => _maxShieldHP; public int CurrentShieldHP { get; private set; } /// 当前是否能吸收伤害(护盾 HP > 0 且不在破碎惩罚期)。 public bool HasShield => CurrentShieldHP > 0 && _brokenPenaltyTimer <= 0f; @@ -38,6 +39,7 @@ namespace BaseGames.Combat private void Awake() { Debug.Assert(_config != null, "[ShieldComponent] _config 未赋值,请在 Inspector 中指定 ShieldConfigSO。", this); + _maxShieldHP = _config != null ? _config.MaxShieldHP : 0; CurrentShieldHP = MaxShieldHP; } diff --git a/Assets/Scripts/Core/Difficulty/IDifficultyService.cs b/Assets/Scripts/Core/Difficulty/IDifficultyService.cs index fb008f1..436333a 100644 --- a/Assets/Scripts/Core/Difficulty/IDifficultyService.cs +++ b/Assets/Scripts/Core/Difficulty/IDifficultyService.cs @@ -1,3 +1,5 @@ +using BaseGames.Core.Events; + namespace BaseGames.Core { /// diff --git a/Assets/Scripts/Quest/IRewardTarget.cs b/Assets/Scripts/Core/Events/IRewardTarget.cs similarity index 96% rename from Assets/Scripts/Quest/IRewardTarget.cs rename to Assets/Scripts/Core/Events/IRewardTarget.cs index 7556cdf..cf18432 100644 --- a/Assets/Scripts/Quest/IRewardTarget.cs +++ b/Assets/Scripts/Core/Events/IRewardTarget.cs @@ -1,4 +1,4 @@ -namespace BaseGames.Quest +namespace BaseGames.Core.Events { /// /// 奖励接收目标接口(架构 22_QuestChallengeModule §4)。 diff --git a/Assets/Scripts/Quest/IRewardTarget.cs.meta b/Assets/Scripts/Core/Events/IRewardTarget.cs.meta similarity index 100% rename from Assets/Scripts/Quest/IRewardTarget.cs.meta rename to Assets/Scripts/Core/Events/IRewardTarget.cs.meta diff --git a/Assets/Scripts/Core/Save/SaveManager.cs b/Assets/Scripts/Core/Save/SaveManager.cs index 57b3bed..e4b4367 100644 --- a/Assets/Scripts/Core/Save/SaveManager.cs +++ b/Assets/Scripts/Core/Save/SaveManager.cs @@ -27,6 +27,7 @@ namespace BaseGames.Core.Save private SaveData _current; private int _currentSlot = 0; public int CurrentSlot => _currentSlot; + public SaveData Data => _current; public string LastCheckpointScene { get; private set; } public string LastCheckpointSpawnId { get; private set; } diff --git a/Assets/Scripts/Editor/NavSurfaceBakeShortcut.cs b/Assets/Scripts/Editor/NavSurfaceBakeShortcut.cs index 66daa39..cf330d1 100644 --- a/Assets/Scripts/Editor/NavSurfaceBakeShortcut.cs +++ b/Assets/Scripts/Editor/NavSurfaceBakeShortcut.cs @@ -1,3 +1,4 @@ +using System.Reflection; using UnityEditor; using UnityEngine; using PathBerserker2d; @@ -11,6 +12,12 @@ namespace BaseGames.Editor /// public static class NavSurfaceBakeShortcut { + // NavSurface.StartBakeJob() 和 NavSurface.BakeJob 均为 internal,通过反射访问。 + private static readonly MethodInfo s_startBakeJobMethod = + typeof(NavSurface).GetMethod("StartBakeJob", BindingFlags.NonPublic | BindingFlags.Instance); + private static readonly PropertyInfo s_bakeJobProp = + typeof(NavSurface).GetProperty("BakeJob", BindingFlags.NonPublic | BindingFlags.Instance); + [MenuItem("BaseGames/Tools/Bake All NavSurfaces %#b", priority = 100)] public static void BakeAll() { @@ -26,7 +33,7 @@ namespace BaseGames.Editor { if (surface == null) continue; - surface.StartBakeJob(); + s_startBakeJobMethod?.Invoke(surface, null); EditorApplication.update -= MakeWatcher(surface); EditorApplication.update += MakeWatcher(surface); count++; @@ -49,16 +56,28 @@ namespace BaseGames.Editor EditorApplication.CallbackFunction watcher = null; watcher = () => { - if (surface == null || surface.BakeJob == null) + if (surface == null) { EditorApplication.update -= watcher; return; } - if (surface.BakeJob.IsFinished) + + var bakeJob = s_bakeJobProp?.GetValue(surface); + if (bakeJob == null) + { + EditorApplication.update -= watcher; + return; + } + + bool isFinished = (bool)bakeJob.GetType() + .GetProperty("IsFinished")!.GetValue(bakeJob); + if (isFinished) { EditorApplication.update -= watcher; EditorUtility.SetDirty(surface); - Debug.Log($"[NavSurfaceBake] ✓ {surface.name} 烘焙完成({surface.BakeJob.TotalBakeTime} ms)"); + float totalTime = (float)bakeJob.GetType() + .GetProperty("TotalBakeTime")!.GetValue(bakeJob); + Debug.Log($"[NavSurfaceBake] ✓ {surface.name} 烘焙完成({totalTime} ms)"); } }; return watcher; diff --git a/Assets/Scripts/Editor/SceneScaffoldTools.cs b/Assets/Scripts/Editor/SceneScaffoldTools.cs index cd9cc62..6587d7f 100644 --- a/Assets/Scripts/Editor/SceneScaffoldTools.cs +++ b/Assets/Scripts/Editor/SceneScaffoldTools.cs @@ -10,6 +10,7 @@ using BaseGames.Enemies; using BaseGames.Input; using BaseGames.Player; using BaseGames.Player.States; +using BaseGames.Skills; using BaseGames.UI; using BaseGames.UI.HUD; using BaseGames.UI.Menus; diff --git a/Assets/Scripts/Enemies/AI/BaseGames.Enemies.AI.asmdef b/Assets/Scripts/Enemies/AI/BaseGames.Enemies.AI.asmdef index 58972a0..4250ca3 100644 --- a/Assets/Scripts/Enemies/AI/BaseGames.Enemies.AI.asmdef +++ b/Assets/Scripts/Enemies/AI/BaseGames.Enemies.AI.asmdef @@ -8,9 +8,12 @@ "versionDefines": [], "rootNamespace": "BaseGames.Enemies.AI", "references": [ + "BaseGames.Core", + "BaseGames.Core.Events", "BaseGames.Enemies", "BaseGames.Enemies.Boss.Patterns", - "Opsive.BehaviorDesigner.Runtime" + "Opsive.BehaviorDesigner.Runtime", + "Kybernetik.Animancer" ], "autoReferenced": true, "overrideReferences": false, diff --git a/Assets/Scripts/Enemies/AI/ILOSRequester.cs b/Assets/Scripts/Enemies/AI/ILOSRequester.cs deleted file mode 100644 index b1aa9a5..0000000 --- a/Assets/Scripts/Enemies/AI/ILOSRequester.cs +++ /dev/null @@ -1,27 +0,0 @@ -using UnityEngine; - -namespace BaseGames.Enemies -{ - /// - /// BatchLOSSystem 的注册接口(架构 07_EnemyModule §12)。 - /// 实现此接口的 EnemyBase 子类可以注册到 BatchLOSSystem, - /// 以批处理方式接收 LOS(Line of Sight)检测结果。 - /// - public interface ILOSRequester - { - /// 射线起点(通常是眼部位置)。 - Vector2 LOSOrigin { get; } - - /// 射线终点(通常是玩家位置)。 - Vector2 LOSTarget { get; } - - /// 遮挡 LOS 的物理图层。 - LayerMask LOSBlockingMask { get; } - - /// - /// 接收 LOS 检测结果。 - /// : true = 有视线,false = 被遮挡。 - /// - void ReceiveLOSResult(bool hasLineOfSight); - } -} diff --git a/Assets/Scripts/Enemies/AI/ILOSRequester.cs.meta b/Assets/Scripts/Enemies/AI/ILOSRequester.cs.meta deleted file mode 100644 index 429d88b..0000000 --- a/Assets/Scripts/Enemies/AI/ILOSRequester.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c504654ba79100742a30b448b0233d63 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Enemies/Boss/Patterns/BaseGames.Enemies.Boss.Patterns.asmdef b/Assets/Scripts/Enemies/Boss/Patterns/BaseGames.Enemies.Boss.Patterns.asmdef index b0c0e55..757971e 100644 --- a/Assets/Scripts/Enemies/Boss/Patterns/BaseGames.Enemies.Boss.Patterns.asmdef +++ b/Assets/Scripts/Enemies/Boss/Patterns/BaseGames.Enemies.Boss.Patterns.asmdef @@ -8,6 +8,8 @@ "versionDefines": [], "rootNamespace": "BaseGames.Enemies.Boss.Patterns", "references": [ + "BaseGames.Core", + "BaseGames.Core.Events", "BaseGames.Enemies", "BaseGames.Combat" ], diff --git a/Assets/Scripts/Equipment/Effects/OnHitEffect.cs b/Assets/Scripts/Equipment/Effects/OnHitEffect.cs index 55e19b0..65b8cc2 100644 --- a/Assets/Scripts/Equipment/Effects/OnHitEffect.cs +++ b/Assets/Scripts/Equipment/Effects/OnHitEffect.cs @@ -28,7 +28,7 @@ namespace BaseGames.Equipment public float chance; // 触发概率(0~1) private HitConfirmedEventChannelSO _onHitChannel; - private EventSubscription _sub; + private EventSubscription? _sub; public void OnEquip(EquipmentContext ctx) { diff --git a/Assets/Scripts/Equipment/Effects/StatModifierEffect.cs b/Assets/Scripts/Equipment/Effects/StatModifierEffect.cs index 676c993..9d60a16 100644 --- a/Assets/Scripts/Equipment/Effects/StatModifierEffect.cs +++ b/Assets/Scripts/Equipment/Effects/StatModifierEffect.cs @@ -1,4 +1,5 @@ using System; +using BaseGames.Player; namespace BaseGames.Equipment { diff --git a/Assets/Scripts/Localization/BaseGames.Localization.asmdef b/Assets/Scripts/Localization/BaseGames.Localization.asmdef index 6faa6e6..0d0e681 100644 --- a/Assets/Scripts/Localization/BaseGames.Localization.asmdef +++ b/Assets/Scripts/Localization/BaseGames.Localization.asmdef @@ -8,7 +8,8 @@ "versionDefines": [], "rootNamespace": "BaseGames.Localization", "references": [ - "BaseGames.Core.Events" + "BaseGames.Core.Events", + "BaseGames.Core.Save" ], "autoReferenced": true, "overrideReferences": false, diff --git a/Assets/Scripts/Localization/LocalizationManager.cs b/Assets/Scripts/Localization/LocalizationManager.cs index 895b4dd..9f6dc28 100644 --- a/Assets/Scripts/Localization/LocalizationManager.cs +++ b/Assets/Scripts/Localization/LocalizationManager.cs @@ -84,10 +84,10 @@ namespace BaseGames.Localization } /// - /// 获取本地化字符串(实例方法)。 + /// 获取本地化字符串(显式接口实现)。 /// 查找顺序:当前语言 → 回退语言(English)→ 直接返回 key。 /// - public string Get(string key, string table = "UI") + string ILocalizationService.Get(string key, string table) { if (string.IsNullOrEmpty(key)) return string.Empty; @@ -134,7 +134,9 @@ namespace BaseGames.Localization dict = LoadTable(language, table); _cache[cacheKey] = dict; // 即使加载失败也存入空字典,避免每帧重试 } - return dict != null && dict.TryGetValue(key, out value); + if (dict != null && dict.TryGetValue(key, out value)) return true; + value = null; + return false; } /// diff --git a/Assets/Scripts/Player/PlayerStats.cs b/Assets/Scripts/Player/PlayerStats.cs index 59b7fe8..7b18b29 100644 --- a/Assets/Scripts/Player/PlayerStats.cs +++ b/Assets/Scripts/Player/PlayerStats.cs @@ -3,7 +3,6 @@ using UnityEngine; using BaseGames.Core; using BaseGames.Core.Events; using BaseGames.Core.Save; -using BaseGames.Quest; namespace BaseGames.Player { diff --git a/Assets/Scripts/Quest/BaseGames.Quest.asmdef b/Assets/Scripts/Quest/BaseGames.Quest.asmdef index 638c94d..e116e70 100644 --- a/Assets/Scripts/Quest/BaseGames.Quest.asmdef +++ b/Assets/Scripts/Quest/BaseGames.Quest.asmdef @@ -8,13 +8,15 @@ "versionDefines": [], "rootNamespace": "BaseGames.Quest", "references": [ + "BaseGames.Core", "BaseGames.Core.Events", "BaseGames.Core.Save", "BaseGames.Player", "BaseGames.World", "BaseGames.Enemies", "BaseGames.Dialogue", - "Unity.Addressables" + "Unity.Addressables", + "Unity.ResourceManager" ], "autoReferenced": true, "overrideReferences": false, diff --git a/Assets/Scripts/Quest/IQuestManager.cs b/Assets/Scripts/Quest/IQuestManager.cs index 9875129..32b5d56 100644 --- a/Assets/Scripts/Quest/IQuestManager.cs +++ b/Assets/Scripts/Quest/IQuestManager.cs @@ -1,3 +1,4 @@ +using BaseGames.Core.Events; using QuestStateEnum = BaseGames.Core.Events.QuestState; namespace BaseGames.Quest diff --git a/Assets/Scripts/Spells/BaseGames.Spells.asmdef b/Assets/Scripts/Spells/BaseGames.Spells.asmdef index 5868ee4..4b2b7cb 100644 --- a/Assets/Scripts/Spells/BaseGames.Spells.asmdef +++ b/Assets/Scripts/Spells/BaseGames.Spells.asmdef @@ -12,6 +12,7 @@ "BaseGames.Input", "BaseGames.Player", "BaseGames.Combat", + "BaseGames.Skills", "Kybernetik.Animancer" ], "autoReferenced": true, diff --git a/Assets/Scripts/Support/AntiSoftlock/AntiSoftlockSystem.cs b/Assets/Scripts/Support/AntiSoftlock/AntiSoftlockSystem.cs index 4e6021b..0547257 100644 --- a/Assets/Scripts/Support/AntiSoftlock/AntiSoftlockSystem.cs +++ b/Assets/Scripts/Support/AntiSoftlock/AntiSoftlockSystem.cs @@ -66,7 +66,7 @@ namespace BaseGames.Support.AntiSoftlock if (_player == null || !_player.Stats.IsAlive) return; Vector2 pos = _player.transform.position; - float vel = _playerRb != null ? _playerRb.linearVelocity.magnitude : Vector2.Distance(pos, _lastPos) / Time.deltaTime; + float vel = _playerRb != null ? _playerRb.velocity.magnitude : Vector2.Distance(pos, _lastPos) / Time.deltaTime; if (vel > _minVelocityThreshold) { diff --git a/Assets/Scripts/Support/BaseGames.Support.asmdef b/Assets/Scripts/Support/BaseGames.Support.asmdef index 19f07be..bde9416 100644 --- a/Assets/Scripts/Support/BaseGames.Support.asmdef +++ b/Assets/Scripts/Support/BaseGames.Support.asmdef @@ -14,7 +14,8 @@ "BaseGames.Progression", "BaseGames.Platform", "Unity.TextMeshPro", - "Unity.RenderPipelines.Universal.Runtime" + "Unity.RenderPipelines.Universal.Runtime", + "Unity.RenderPipelines.Core.Runtime" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/Assets/Scripts/Tutorial/TutorialHintUI.cs b/Assets/Scripts/Tutorial/TutorialHintUI.cs index 21a0f39..ed1d34e 100644 --- a/Assets/Scripts/Tutorial/TutorialHintUI.cs +++ b/Assets/Scripts/Tutorial/TutorialHintUI.cs @@ -12,7 +12,9 @@ namespace BaseGames.Tutorial { [SerializeField] private GameObject _panel; [SerializeField] private TMP_Text _label; +#pragma warning disable CS0414 [SerializeField] private float _fadeSpeed = 4f; +#pragma warning restore CS0414 private Coroutine _autoHideCoroutine; diff --git a/Assets/Scripts/World/DestructibleTile.cs b/Assets/Scripts/World/DestructibleTile.cs index e30488f..c5b19c3 100644 --- a/Assets/Scripts/World/DestructibleTile.cs +++ b/Assets/Scripts/World/DestructibleTile.cs @@ -8,7 +8,9 @@ namespace BaseGames.World /// public class DestructibleTile : MonoBehaviour, IDamageable { +#pragma warning disable CS0414 [SerializeField] private int _maxHP = 1; +#pragma warning restore CS0414 [SerializeField] private string _destructedId; /// /// ScriptableObject 注入(非静态 Instance)。 diff --git a/Assets/Scripts/World/HazardZone.cs b/Assets/Scripts/World/HazardZone.cs index 4624d86..9c378c3 100644 --- a/Assets/Scripts/World/HazardZone.cs +++ b/Assets/Scripts/World/HazardZone.cs @@ -13,7 +13,9 @@ namespace BaseGames.World [SerializeField] private bool _isInstantKill = true; [SerializeField] private int _damage = 9999; +#pragma warning disable CS0414 [SerializeField] private RespawnType _respawnType = RespawnType.AtLastSavePoint; +#pragma warning restore CS0414 private void OnTriggerEnter2D(Collider2D other) { diff --git a/Assets/Scripts/World/Liquid/LiquidZone.cs b/Assets/Scripts/World/Liquid/LiquidZone.cs index c4ece13..675f54c 100644 --- a/Assets/Scripts/World/Liquid/LiquidZone.cs +++ b/Assets/Scripts/World/Liquid/LiquidZone.cs @@ -19,8 +19,10 @@ namespace BaseGames.World.Liquid [SerializeField] private string _zoneId; [Header("伤害(Water 类型专用;Acid/Lava 由子节点 HazardZone 处理)")] +#pragma warning disable CS0414 [SerializeField] private bool _dealsDrowningDamage = false; [SerializeField] private float _drowningDamagePerSecond = 5f; +#pragma warning restore CS0414 [Header("物理配置")] [SerializeField] private LiquidPhysicsConfigSO _physicsConfig; diff --git a/Assets/Settings/PlayerInputActions.cs b/Assets/Settings/PlayerInputActions.cs index 489cc09..ba6c037 100644 --- a/Assets/Settings/PlayerInputActions.cs +++ b/Assets/Settings/PlayerInputActions.cs @@ -235,6 +235,15 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable ""processors"": """", ""interactions"": """", ""initialStateCheck"": false + }, + { + ""name"": ""Spell"", + ""type"": ""Button"", + ""id"": ""7fa3801f-a2db-4ea0-a8f4-2ed90f7ecd8f"", + ""expectedControlType"": """", + ""processors"": """", + ""interactions"": """", + ""initialStateCheck"": false } ], ""bindings"": [ @@ -556,6 +565,17 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable ""action"": ""Pause"", ""isComposite"": false, ""isPartOfComposite"": false + }, + { + ""name"": """", + ""id"": ""d10abe98-84d1-4c7f-a6d2-5f1919026dd5"", + ""path"": """", + ""interactions"": """", + ""processors"": """", + ""groups"": """", + ""action"": ""Spell"", + ""isComposite"": false, + ""isPartOfComposite"": false } ] }, @@ -804,6 +824,7 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable m_Gameplay_SpiritSkill2 = m_Gameplay.FindAction("SpiritSkill2", throwIfNotFound: true); m_Gameplay_Interact = m_Gameplay.FindAction("Interact", throwIfNotFound: true); m_Gameplay_Pause = m_Gameplay.FindAction("Pause", throwIfNotFound: true); + m_Gameplay_Spell = m_Gameplay.FindAction("Spell", throwIfNotFound: true); // UI m_UI = asset.FindActionMap("UI", throwIfNotFound: true); m_UI_Navigate = m_UI.FindAction("Navigate", throwIfNotFound: true); @@ -908,6 +929,7 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable private readonly InputAction m_Gameplay_SpiritSkill2; private readonly InputAction m_Gameplay_Interact; private readonly InputAction m_Gameplay_Pause; + private readonly InputAction m_Gameplay_Spell; /// /// Provides access to input actions defined in input action map "Gameplay". /// @@ -984,6 +1006,10 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable /// public InputAction @Pause => m_Wrapper.m_Gameplay_Pause; /// + /// Provides access to the underlying input action "Gameplay/Spell". + /// + public InputAction @Spell => m_Wrapper.m_Gameplay_Spell; + /// /// Provides access to the underlying input action map instance. /// public InputActionMap Get() { return m_Wrapper.m_Gameplay; } @@ -1057,6 +1083,9 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable @Pause.started += instance.OnPause; @Pause.performed += instance.OnPause; @Pause.canceled += instance.OnPause; + @Spell.started += instance.OnSpell; + @Spell.performed += instance.OnSpell; + @Spell.canceled += instance.OnSpell; } /// @@ -1116,6 +1145,9 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable @Pause.started -= instance.OnPause; @Pause.performed -= instance.OnPause; @Pause.canceled -= instance.OnPause; + @Spell.started -= instance.OnSpell; + @Spell.performed -= instance.OnSpell; + @Spell.canceled -= instance.OnSpell; } /// @@ -1434,6 +1466,13 @@ public partial class @PlayerInputActions: IInputActionCollection2, IDisposable /// /// void OnPause(InputAction.CallbackContext context); + /// + /// Method invoked when associated input action "Spell" is either , or . + /// + /// + /// + /// + void OnSpell(InputAction.CallbackContext context); } /// /// Interface to implement callback methods for all input action callbacks associated with input actions defined by "UI" which allows adding and removing callbacks. diff --git a/Assets/Settings/PlayerInputActions.inputactions b/Assets/Settings/PlayerInputActions.inputactions index 7784611..ed206a9 100644 --- a/Assets/Settings/PlayerInputActions.inputactions +++ b/Assets/Settings/PlayerInputActions.inputactions @@ -149,6 +149,15 @@ "processors": "", "interactions": "", "initialStateCheck": false + }, + { + "name": "Spell", + "type": "Button", + "id": "7fa3801f-a2db-4ea0-a8f4-2ed90f7ecd8f", + "expectedControlType": "", + "processors": "", + "interactions": "", + "initialStateCheck": false } ], "bindings": [ @@ -470,6 +479,17 @@ "action": "Pause", "isComposite": false, "isPartOfComposite": false + }, + { + "name": "", + "id": "d10abe98-84d1-4c7f-a6d2-5f1919026dd5", + "path": "", + "interactions": "", + "processors": "", + "groups": "", + "action": "Spell", + "isComposite": false, + "isPartOfComposite": false } ] },