// Update is called once per frame void Update() { float movePlayerVector = Input.GetAxis("Horizontal"); bool isFacingRight; if (movePlayerVector >= 0) { isFacingRight = true; } else { isFacingRight = false; } //Funktion für Springen if (Input.GetKey("w")) { if (!meleeSys.blocking && !movement.unableToMove) { StartCoroutine(movement.jump()); } } //Funktion für Rollen if (Input.GetKey("k")) { movement.roll(); } //Funktion für Schießen if (Input.GetKeyDown("s")) { StartCoroutine(rangedSys.shoot(primaryShot)); } if (Input.GetKeyDown("b")) { meleeSys.block(); } if (Input.GetKeyUp("b")) { meleeSys.unblock(); } if (Input.GetKeyDown("c")) { rangedSys.switchWeapon(); primaryShot = !primaryShot; } if (Input.GetKeyDown("k")) { if (!attComp.getCooldown2Active()) { abilitySys.clone(); } } if (Input.GetKeyDown("j")) { if (movement.grounded && meleeSys.anim != null && !meleeSys.anim.GetBool("MeleeAttackInQueue")) { movePlayerVector = 0.0f; meleeSys.punch(); } } if (meleeSys.animationRunning || meleeSys.blocking || movement.unableToMove) { movePlayerVector = 0.0f; } movement.move(movePlayerVector); }