Updated Unity to unity 6.

This commit is contained in:
Finnchen123
2025-06-07 09:05:32 +02:00
parent b65929243b
commit 5a68fc0447
11 changed files with 2558 additions and 197 deletions

View File

@@ -169,7 +169,7 @@ namespace Assets.Scripts.Player
public void move(Vector3 input)
{
if(gameObject.GetComponent<Rigidbody>().velocity.y <= 0.1f && gameObject.GetComponent<Rigidbody>().velocity.y >= -0.1f){
if(gameObject.GetComponent<Rigidbody>().linearVelocity.y <= 0.1f && gameObject.GetComponent<Rigidbody>().linearVelocity.y >= -0.1f){
jumpFrameCounter++;
}
@@ -181,7 +181,7 @@ namespace Assets.Scripts.Player
{
if (canJump)
{
gameObject.GetComponent<Rigidbody>().velocity = new Vector3(0, 5, 0);
gameObject.GetComponent<Rigidbody>().linearVelocity = new Vector3(0, 5, 0);
audioHandler.playJump();
canJump = false;
}