using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.Networking;
|
|
using Networking.Server;
|
|
using Networking;
|
|
|
|
public class portalTesting : MonoBehaviour
|
|
{
|
|
public ConnectionHandler 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].collected++;
|
|
if(ConnectedClients[0].collected >= 5){
|
|
ps.validIndex.Add(0);
|
|
}
|
|
}
|
|
if(Input.GetKeyDown(KeyCode.B)){
|
|
ConnectedClients[1].collected++;
|
|
if(ConnectedClients[1].collected >= 5){
|
|
ps.validIndex.Add(1);
|
|
}
|
|
}
|
|
if(Input.GetKeyDown(KeyCode.C)){
|
|
ConnectedClients[2].collected++;
|
|
if(ConnectedClients[2].collected >= 5){
|
|
ps.validIndex.Add(2);
|
|
}
|
|
}
|
|
if(Input.GetKeyDown(KeyCode.D)){
|
|
ConnectedClients[3].collected++;
|
|
if(ConnectedClients[3].collected >= 5){
|
|
ps.validIndex.Add(3);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|