// Copyright (c) 2025-2026 GeWuYou // SPDX-License-Identifier: Apache-2.0 namespace GFramework.Game.Abstractions.Input; /// /// 描述一个逻辑动作当前持有的绑定集合。 /// public sealed class InputActionBinding { /// /// 初始化一个动作绑定快照。 /// /// 动作名称。 /// 当前绑定列表。 /// 为空时抛出。 public InputActionBinding(string actionName, IReadOnlyList bindings) { if (string.IsNullOrWhiteSpace(actionName)) { throw new ArgumentException("Action name cannot be null or whitespace.", nameof(actionName)); } ActionName = actionName; Bindings = bindings ?? Array.Empty(); } /// /// 获取动作名称。 /// public string ActionName { get; } /// /// 获取当前绑定列表。 /// public IReadOnlyList Bindings { get; } }