Exemplo n.º 1
0
    private void Update()
    {
        KeyDownList.Clear();
        KeyDownHashes.Clear();
        KeyUpList.Clear();
        KeyUpHashes.Clear();
        Space = false;

        for (int i = 0; i < 26; i++)
        {
            KeyCode key = _alphabet[i];
            if (Input.GetKeyDown(key))
            {
                KeyDownList.Add(key);
                KeyDownHashes.Add(key);
            }

            if (Input.GetKeyUp(key))
            {
                KeyUpList.Add(key);
                KeyUpHashes.Add(key);
            }
        }

        if (Input.GetKeyUp(KeyCode.Space))
        {
            Space = true;
        }

        if (NewInput != null)
        {
            NewInput.Invoke(this);
        }
    }
Exemplo n.º 2
0
    void Awake()
    {
        newInput = new NewInput();
        newInput.PlayerControls.SetCallbacks(this);

        walkSound_1 = "footsteps 1";
        walkSound_2 = "footsteps 2";
        walkSound_3 = "footsteps 3";
        walkSound_4 = "footsteps 4";
    }
Exemplo n.º 3
0
    // Start is called before the first frame update
    void Start()
    {
        List <string> deck = Solitaire.GenerateDeck();

        solitaire = FindObjectOfType <Solitaire>();
        newInput  = FindObjectOfType <NewInput>();

        int i = 0;

        foreach (string card in deck)
        {
            if (this.name == card)
            {
                Face = solitaire.cardFaces[i];
                break;
            }
            i++;
        }
        spriteRenderer = GetComponent <SpriteRenderer>();
        select         = GetComponent <Select>();
    }
Exemplo n.º 4
0
 public TestActions(NewInput wrapper)
 {
     m_Wrapper = wrapper;
 }
Exemplo n.º 5
0
        public async Task <int> Commit(NewInput input)
        {
            var e = ObjectMapper.Map <FJ>(input);

            return(await _fjRepository.InsertOrUpdateAndGetIdAsync(e));
        }