public InputModule(OnlineNetwork network, bool isLocalPlayer, int playerNum) { this.network = network; this.isLocalPlayer = isLocalPlayer; this.playerNum = playerNum; _xAxis = new LeftRightInput(isLocalPlayer, playerNum); _yAxis = new UpDownInput(isLocalPlayer, playerNum); _stab = new StabInput(isLocalPlayer, playerNum); _swingLeft = new SwingLeftInput(isLocalPlayer, playerNum); _swingRight = new SwingRightInput(isLocalPlayer, playerNum); _dodge = new DodgeInput(isLocalPlayer, playerNum); }
private void CheckDodgeInput() { if (Input.GetKeyDown(gameSettings.dodgeKey)) { DodgeInput.Invoke(KeyInputType.Down); } else if (Input.GetKey(gameSettings.dodgeKey)) { DodgeInput.Invoke(KeyInputType.Held); } else if (Input.GetKeyUp(gameSettings.dodgeKey)) { DodgeInput.Invoke(KeyInputType.Up); } }