Ejemplo n.º 1
0
    private void Awake()
    {
        controls = new InputMaster1();

        // Sprint
        controls.Player.Sprint.performed += _ => Sprint();
        controls.Player.Sprint.canceled  += _ => Walk();

        // Crouch
        controls.Player.Crouch.performed += _ => Crouch();
        controls.Player.Crouch.canceled  += _ => Walk();

        // Rewind
        RewindScripts   = FindObjectsOfType <Rewind>();
        Rewind.maxValue = maxRewindTime;
        controls.Player.Rewind.performed += _ => StartRewind();
        controls.Player.Rewind.canceled  += _ => StopRewind();

        controls.Player.Interacting.performed += _ => EnterCode();
    }
Ejemplo n.º 2
0
 public void Awake()
 {
     controls = new InputMaster1();
     controls.Player.Punch.performed += _ => PunchActive = true;
     controls.Player.Punch.canceled  += _ => PunchActive = false;
 }