private void Update() { if (gun) { if (Input.GetKeyDown(shootKey)) { gun.ButtonPressed(playerPlatformerController.flipped ? -1 : 1); } if (Input.GetKey(shootKey)) { gun.ButtonHold(playerPlatformerController.flipped ? -1 : 1); } if (Input.GetKeyUp(shootKey)) { gun.ButtonUp(playerPlatformerController.flipped ? -1 : 1); } } }