You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

51 lines
1.0 KiB

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
using Networking.Server;
using Networking;
public class portalTesting : MonoBehaviour
{
public ClientList clientDataList;
public List<ClientData> ConnectedClients;
public PortalSetup ps;
void Start(){
ConnectedClients = clientDataList.ConnectedClients;
}
// Update is called once per frame
void Update()
{
if(Input.GetKeyDown(KeyCode.A)){
ConnectedClients[0].SceneScore++;
if(ConnectedClients[0].SceneScore >= 5){
ps.validIndex.Add(0);
}
}
if(Input.GetKeyDown(KeyCode.B)){
ConnectedClients[1].SceneScore++;
if(ConnectedClients[1].SceneScore >= 5){
ps.validIndex.Add(1);
}
}
if(Input.GetKeyDown(KeyCode.C)){
ConnectedClients[2].SceneScore++;
if(ConnectedClients[2].SceneScore >= 5){
ps.validIndex.Add(2);
}
}
if(Input.GetKeyDown(KeyCode.D)){
ConnectedClients[3].SceneScore++;
if(ConnectedClients[3].SceneScore >= 5){
ps.validIndex.Add(3);
}
}
}
}