feat: accent obert A
This commit is contained in:
parent
63d0524d3c
commit
3e31ecc943
5 changed files with 17 additions and 3 deletions
|
@ -19,6 +19,7 @@ namespace Domain {
|
||||||
_readers.Add(typeof(TjReader), new TjReader(_history));
|
_readers.Add(typeof(TjReader), new TjReader(_history));
|
||||||
_readers.Add(typeof(LlReader), new LlReader(_history));
|
_readers.Add(typeof(LlReader), new LlReader(_history));
|
||||||
_readers.Add(typeof(SsReader), new SsReader(_history));
|
_readers.Add(typeof(SsReader), new SsReader(_history));
|
||||||
|
_readers.Add(typeof(AObertaReader), new AObertaReader(_history));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateInput() {
|
public void UpdateInput() {
|
||||||
|
|
8
Assets/Scripts/Domain/Input/AObertaReader.cs
Normal file
8
Assets/Scripts/Domain/Input/AObertaReader.cs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace Domain.Input {
|
||||||
|
public class AObertaReader : SequentialInputReader {
|
||||||
|
public AObertaReader(KeyHistory history) : base(history, new List<int>{ 0xBA, 0x41 }) { }
|
||||||
|
}
|
||||||
|
}
|
3
Assets/Scripts/Domain/Input/AObertaReader.cs.meta
Normal file
3
Assets/Scripts/Domain/Input/AObertaReader.cs.meta
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d9af0ad3cdac447e803e2d16325ec74f
|
||||||
|
timeCreated: 1713278245
|
|
@ -5,9 +5,9 @@ namespace Domain {
|
||||||
public class KeyHistory {
|
public class KeyHistory {
|
||||||
private readonly LimitedSizeList<int> _lastPresses = new(10);
|
private readonly LimitedSizeList<int> _lastPresses = new(10);
|
||||||
|
|
||||||
private readonly int[] _customKeys = { 191, 51, 222, 186 };
|
private readonly int[] _customKeys = { 191, 51, 222, 186, 0xBA };
|
||||||
private readonly bool[] _isPressed = new bool[26 + 5];
|
private readonly bool[] _isPressed = new bool[26 + 6];
|
||||||
private readonly bool[] _wasPressed = new bool[26 + 5];
|
private readonly bool[] _wasPressed = new bool[26 + 6];
|
||||||
|
|
||||||
public void KeyPressed(int key) => _lastPresses.Add(key);
|
public void KeyPressed(int key) => _lastPresses.Add(key);
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,8 @@ namespace View.UI {
|
||||||
_click.Execute();
|
_click.Execute();
|
||||||
if (_customInput.KeyDown(typeof(TxReader)))
|
if (_customInput.KeyDown(typeof(TxReader)))
|
||||||
_click.Execute();
|
_click.Execute();
|
||||||
|
if(_customInput.KeyDown(typeof(AObertaReader)))
|
||||||
|
_click.Execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateView(int score) {
|
public void UpdateView(int score) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue