예제 #1
0
 public void OnPlayerJoins(bool connects, int index, Inputs.ControllerType type)
 {
     if (connects)
     {
         nbPlayers += 1;
         connections[index].connect(type);
     }
     else
     {
         nbPlayers -= 1;
         connections[index].disconnect();
     }
     waiting.SetActive(nbPlayers != 2);
     start.SetActive(nbPlayers == 2);
 }
예제 #2
0
 public ConnectionInfos(KeyCode ak, int ci, Inputs.ControllerType ct)
 {
     accessKey       = ak;
     controllerIndex = ci;
     controllerType  = ct;
 }
예제 #3
0
 public void connect(Inputs.ControllerType type)
 {
     img.sprite = type == Inputs.ControllerType.CONTROLLER ? controller : keyboard;
     disconnected.SetActive(false);
     connected.SetActive(true);
 }