Files
CustomPlayerActionManager/Scripts/Utilities/ActionSetUserDataExtension.cs
2025-06-04 16:16:46 +09:30

22 lines
684 B
C#

using System.Collections.Generic;
public static class ActionSetUserDataExtension
{
public static void AddUniConflict(this PlayerActionsBase self, PlayerActionsBase other)
{
List<PlayerActionsBase> list = new List<PlayerActionsBase>((self.UserData as PlayerActionData.ActionSetUserData).bindingsConflictWithSet);
if(!list.Contains(other))
{
list.Add(other);
self.UserData = new PlayerActionData.ActionSetUserData(list.ToArray());
}
}
public static void AddBiConflict(this PlayerActionsBase self, PlayerActionsBase other)
{
self.AddUniConflict(other);
other.AddUniConflict(self);
}
}