Remove dead behavior data query API
This commit is contained in:
parent
a21b249d8e
commit
19297f2252
3 changed files with 3 additions and 44 deletions
|
|
@ -970,50 +970,6 @@ public abstract class Entity
|
|||
yield return b;
|
||||
}
|
||||
|
||||
public IEnumerable<T> GetBehaviorData<T>() where T : BehaviorData
|
||||
{
|
||||
foreach (var equippedItem in Equipment)
|
||||
foreach (var behavior in equippedItem.Behaviors)
|
||||
if (behavior.Data is T b)
|
||||
yield return b;
|
||||
}
|
||||
|
||||
// public IEnumerable<(T t, Switch s)> GetSwitch<T>() where T : class, IBehavior
|
||||
// {
|
||||
// foreach (var equippedItem in Equipment)
|
||||
// foreach (var group in equippedItem.BehaviorGroups.Values)
|
||||
// foreach(var behavior in group.Behaviors)
|
||||
// if (behavior is T t)
|
||||
// {
|
||||
// var s = group.GetExposed<Switch>();
|
||||
// if (s != null) yield return (t, s);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public IEnumerable<(T behavior, Trigger trigger)> GetTrigger<T>() where T : class, IBehavior
|
||||
// {
|
||||
// foreach (var equippedItem in Equipment)
|
||||
// foreach (var group in equippedItem.BehaviorGroups.Values)
|
||||
// foreach(var behavior in group.Behaviors)
|
||||
// if (behavior is T t)
|
||||
// {
|
||||
// var s = group.GetExposed<Trigger>();
|
||||
// if (s != null) yield return (t, s);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// public IEnumerable<(T behavior, Axis axis)> GetAxis<T>() where T : class, IBehavior
|
||||
// {
|
||||
// foreach (var equippedItem in Equipment)
|
||||
// foreach (var group in equippedItem.BehaviorGroups.Values)
|
||||
// foreach(var behavior in group.Behaviors)
|
||||
// if (behavior is T t)
|
||||
// {
|
||||
// var s = group.GetExposed<Axis>();
|
||||
// if (s != null) yield return (t, s);
|
||||
// }
|
||||
// }
|
||||
|
||||
public virtual void Update(float delta)
|
||||
{
|
||||
TargetRange = Target.Value == null ? -1 : length(Position - Target.Value.Position);
|
||||
|
|
|
|||
Loading…
Reference in a new issue