Example #1
0
    void Update()
    {
        if (Input.GetKeyDown(punchButton))
        {
            input.SetCoup(MyInput.Coup.PUNCH);
        }
        else if (Input.GetKeyDown(kickButton))
        {
            input.SetCoup(MyInput.Coup.KICK);
        }
        else if (Input.GetKeyDown(uppercutButton))
        {
            input.SetCoup(MyInput.Coup.UPPERCUT);
        }
        else if (Input.GetKeyDown(protectButton))
        {
            input.SetCoup(MyInput.Coup.PROTECT);
        }

        if (Input.GetKeyDown(leftButton))
        {
            input.SetDeplacement(MyInput.Deplacement.LEFT);
        }
        else if (Input.GetKeyDown(rightButton))
        {
            input.SetDeplacement(MyInput.Deplacement.RIGHT);
        }
    }