blob: 183acfbb2bd04c388d31352e7373fbee6652226a (
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 AllCondition : ICondition<bool> {
private IBinaryInputDefinition[] _definitions;
public AllCondition(params IBinaryInputDefinition[] definitions)
=> _definitions = definitions;
public bool Poll() {
for (int i = 0; i < _definitions.Length; i++) if (!_definitions[i].Test()) return false;
return true;
}
}
}
|