int buttonIndexNum = 3; // End condition is 3. void OnTriggerEnter() { CarDefault.Pause(); NameText.GetComponent <Text>().enabled = false; FinishPanel.SetActive(true); CarControls.SetActive(true); var Client = GameObject.Find("PressController").GetComponent <ForPress>(); Debug.Log("Individual is finished!"); theClient = Client.theClient; theClient.PutOpenvibeButton(0); // Client.theClient.Press(buttonIndexNum); FinalPanelManager_auto.MinuteCount = LapTimeManager_auto.MinuteCount; FinalPanelManager_auto.SecondCount = LapTimeManager_auto.SecondCount; FinalPanelManager_auto.MilliCount = LapTimeManager_auto.MilliCount; textValue = LapTimeManager_auto.MinuteCount + ":" + LapTimeManager_auto.SecondCount + ":" + LapTimeManager_auto.MilliCount; System.IO.File.WriteAllText(savePath, textValue, Encoding.Default); LapTimeManager_auto.MinuteCount = 0; LapTimeManager_auto.SecondCount = 0; LapTimeManager_auto.MilliCount = 0; HalfLapTrig.SetActive(true); LapCompleteTrig.SetActive(false); }
int buttonIndexNum = 3; // End condition is 3. void OnTriggerEnter() { // Stimulate when the game is over. CarDefault.Pause(); NameText.GetComponent <Text>().enabled = false; FinishPanel.SetActive(true); CarControls.SetActive(true); var Client = GameObject.Find("PressController").GetComponent <ForPress>(); Debug.Log("Individual is finished!"); theClient = Client.theClient; theClient.PutOpenvibeButton(0); // theClient.Press(buttonIndexNum); FinalPanelManager.MinuteCount = LapTimeManager.MinuteCount; FinalPanelManager.SecondCount = LapTimeManager.SecondCount; FinalPanelManager.MilliCount = LapTimeManager.MilliCount; LapTimeManager.MinuteCount = 0; LapTimeManager.SecondCount = 0; LapTimeManager.MilliCount = 0; HalfLapTrig.SetActive(true); LapCompleteTrig.SetActive(false); //FinishText.GetComponent<Text>().text = "FINISH"; //FinishText.SetActive(true); }
void Start() { theClient = new UIVA_Client("localhost"); UpArrow.enabled = true; DownArrow.enabled = true; LeftArrow.enabled = true; RightArrow.enabled = true; }
int buttonIndexNum = 3; // End condition is 3. void Start() { // Stimulate when the game is over. var Client = GameObject.Find("Camera").GetComponent <SystemControl>(); theClient = Client.theClient; Debug.Log("Competition is finished!"); theClient.Press(buttonIndexNum); }
void uivaServer() { uivaProcess = new Process(); uivaProcess.StartInfo.FileName = "UIVA_Server.exe"; // uivaProcess.StartInfo.UseShellExecute = false; uivaProcess.StartInfo.CreateNoWindow = true; uivaProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; uivaProcess.Start(); uiva = new UIVA_Client("localhost"); print("Launching UIVA Server"); }
public static void Connect() { try { UIVAClient = new UIVA_Client("localhost"); Connected = true; } catch (Exception se) { Debug.LogWarning(se.ToString()); Connected = false; } }
// Use this for initialization void Start() { uiva = new UIVA_Client("localhost"); original = transform.position; playerPos = new Vector2(0,0); lhPositions = new double[3]; rhPositions = new double[3]; headPositions = new double[3]; quaternions = new double[4]; if(!player) player = transform; // only if attached to something other than the player style.fontSize = 22; style.normal.textColor = Color.white; }
void Update() { if (CheckPause) { return; } if (CheckTheEnd) // If the checking result from ResultUI is the end, it will not do anything. { return; } // Record var Car_1P = GameObject.Find("Car_1P").GetComponent <MoveCar1>(); // Reference the script 'MoveCar1' var Car_2P = GameObject.Find("Car_2P").GetComponent <MoveCar2>(); record_1P = Car_1P.Car.transform.position.z - Ivalue; // Since the initialized position value 'z' of car is Ivalue. ex> 5 record_2P = Car_2P.Car.transform.position.z - Ivalue; DefaultScore1P.text = record_1P.ToString("f2") + "m"; DefaultScore2P.text = record_2P.ToString("f2") + "m"; // Timer timeCount += Time.deltaTime; DefaultTimer.text = timeCount.ToString("f2"); // Stimulate for starting check and trainning time check var Client = GameObject.Find("Camera").GetComponent <SystemControl>(); theClient = Client.theClient; if (stimForInit) { Debug.Log("Competition, Initialize!"); theClient.Press(buttonIndexNum); stimForInit = false; } if (timeCount > trainningTime && stimForTrain) { Debug.Log("Time is up, Trainning is finished!"); theClient.Press(buttonIndexNum); stimForTrain = false; } }
void OnTriggerEnter(Collider Car2) { if (Car2.tag == "Car2") { Triggered2p = true; FinishText.SetActive(true); CarControls2.SetActive(true); // Stimulate when the game is over. var Client = GameObject.Find("PressController").GetComponent <ForPress>(); theClient = Client.theClient; FinishPanelManager_com.MinuteCountBest2p = LapTimeManager2_com.MinuteCount2p; FinishPanelManager_com.SecondCountBest2p = LapTimeManager2_com.SecondCount2p; FinishPanelManager_com.MilliCountBest2p = LapTimeManager2_com.MilliCount2p; textValue = LapTimeManager2_com.MinuteCount2p + ":" + LapTimeManager2_com.SecondCount2p + ":" + LapTimeManager2_com.MilliCount2p; System.IO.File.WriteAllText(savePath, textValue, Encoding.Default); // var Trig1P = GameObject.Find("LapCompleteTrigger").GetComponent<LapCompleteTrigger_com>(); if (LapCompleteTrigger_com.Triggered1p == true) { FinishPanel.SetActive(true); NameText1.GetComponent <Text>().enabled = false; NameText2.GetComponent <Text>().enabled = false; Debug.Log("COmpetition is finished!"); theClient.PutOpenvibeButton(0); // theClient.Press(buttonIndexNum); } LapTimeManager2_com.MinuteCount2p = 0; LapTimeManager2_com.SecondCount2p = 0; LapTimeManager2_com.MilliCount2p = 0; HalfLapTrig.SetActive(true); LapCompleteTrig.SetActive(false); FinishText.SetActive(true); } }
void Start() { client = new UIVA_Client ("127.0.0.1"); }
void Start() { timeCount = 5.4f; // from 5.4 sec to 0 sec theClient = new UIVA_Client(ipUIVAServer); }
void Start() { theClient = new UIVA_Client(ipUIVAServer); timeCount = 5.4f; }
int buttonIndexNum = 0; // Individual's button number is 0. // Use this for initialization void Start() { theClient = new UIVA_Client(ipUIVAServer); }