public bool GetKeyDown(FencingKey key) { var result = GetKey(key) && (!(downLastFrame.ContainsKey(key) && downLastFrame[key])); UpdateKey(key); return(result); }
protected override KeyControl GetKeyControl(FencingKey key) => key switch {
public override bool GetKey(FencingKey key) => GetKeyControl(key).isPressed;
protected abstract KeyControl GetKeyControl(FencingKey key);
public override bool GetKey(FencingKey key) => false;
public abstract bool GetKey(FencingKey key);
public void UpdateKey(FencingKey key) { downLastFrame[key] = GetKey(key); }