1
This commit is contained in:
@@ -15,6 +15,9 @@ namespace BITKit
|
||||
/// </summary>
|
||||
public interface IRuntimeItemContainer:IBinarySerialize
|
||||
{
|
||||
public bool AllowAdd { get; set; }
|
||||
public bool AllowRemove { get; set; }
|
||||
|
||||
public ValidHandle IsBusy { get; }
|
||||
/// <summary>
|
||||
/// 物品容器的唯一Id
|
||||
@@ -96,6 +99,8 @@ namespace BITKit
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool AllowAdd { get; set; }
|
||||
public bool AllowRemove { get; set; }
|
||||
public ValidHandle IsBusy { get; } = new();
|
||||
public int Id { get; set; }
|
||||
public IRuntimeItem[] GetItems()=>Items.Values.ToArray();
|
||||
|
@@ -4,6 +4,7 @@ using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using UnityEngine.InputSystem.Controls;
|
||||
|
||||
namespace BITKit
|
||||
{
|
||||
@@ -11,7 +12,7 @@ namespace BITKit
|
||||
{
|
||||
public static bool JustPressed(this InputAction.CallbackContext self)
|
||||
{
|
||||
return self.interaction is null && self.started;
|
||||
return self is { started:true, control: ButtonControl { wasPressedThisFrame: true , isPressed:true} };
|
||||
}
|
||||
public static InputAction RegisterCallback(this InputAction self, Action<InputAction.CallbackContext> action)
|
||||
{
|
||||
|
Reference in New Issue
Block a user