22 lines
461 B
C#
22 lines
461 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.InputSystem;
|
|
|
|
public class PlayerManager : MonoBehaviour
|
|
{
|
|
private PlayerInputManager pim;
|
|
[SerializeReference]
|
|
private CameraOperator cameraOperator;
|
|
// Start is called before the first frame update
|
|
void Awake()
|
|
{
|
|
pim = GetComponent<PlayerInputManager>();
|
|
}
|
|
|
|
public void OnPlayerJoined(PlayerInput pi)
|
|
{
|
|
cameraOperator.AddPlayer(pi.gameObject);
|
|
}
|
|
}
|