blob: a8705398027650c4df5172499f03a23a8bbde79c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
using Celesteia.Game.Input.Definitions;
namespace Celesteia.Game.Input.Conditions {
public class AnyCondition : ICondition<bool> {
private IBinaryInputDefinition[] _definitions;
public AnyCondition(params IBinaryInputDefinition[] definitions)
=> _definitions = definitions;
public bool Poll() {
for (int i = 0; i < _definitions.Length; i++) if (_definitions[i].Test()) return true;
return false;
}
}
}
|