Add player joining

In the platformer scene, whenever you connect a new keyboard or controller, or interact with one already connected, a new player will be created and tied to that input device. Please try to break this system to make sure it works properly.
This commit is contained in:
RochesterX
2025-01-14 11:40:09 -05:00
parent ec1fb4566e
commit b5cc70ad43
8 changed files with 895 additions and 172 deletions

View File

@@ -17,6 +17,8 @@ public class PlatformerCameraMovement : MonoBehaviour
private void Update()
{
if (players.Count == 0) return;
Vector3 playerAverage = Vector3.zero;
foreach (GameObject player in players)
{