コード例 #1
0
        public bool GetKeyDown(FencingKey key)
        {
            var result = GetKey(key) && (!(downLastFrame.ContainsKey(key) && downLastFrame[key]));

            UpdateKey(key);
            return(result);
        }
コード例 #2
0
 protected override KeyControl GetKeyControl(FencingKey key) => key switch
 {
コード例 #3
0
 public override bool GetKey(FencingKey key)
 => GetKeyControl(key).isPressed;
コード例 #4
0
 protected abstract KeyControl GetKeyControl(FencingKey key);
コード例 #5
0
 public override bool GetKey(FencingKey key) => false;
コード例 #6
0
 public abstract bool GetKey(FencingKey key);
コード例 #7
0
 public void UpdateKey(FencingKey key)
 {
     downLastFrame[key] = GetKey(key);
 }