Make game end work

This commit is contained in:
RochesterX
2025-03-07 16:03:11 -05:00
parent 314d8e7aba
commit f146b06e3c
8 changed files with 53 additions and 24 deletions

View File

@@ -114,6 +114,7 @@ public class GameManager : MonoBehaviour
{
EndGameEvent?.Invoke();
print(AlivePlayers()[0].name + " is the winner");
FindFirstObjectByType<PlayerCameraMovement>().WinScene(AlivePlayers()[0]);
}
}

View File

@@ -29,7 +29,7 @@ public class PlayerCameraMovement : MonoBehaviour
if (playerThatWon != null)
{
target = playerThatWon.transform.position;
transform.position = Vector3.Lerp(transform.position, new Vector3(target.x, target.y, target.z - 10), speed * Time.deltaTime);
transform.position = Vector3.Lerp(transform.position, new Vector3(target.x, target.y, target.z - 10), speed * 2 * Time.deltaTime);
}
return;