public IEnumerator showfloatingtext() { Debug.Log("show floating"); int bacaSlide = 20; var go = Instantiate(floatingTextPrefabs, transform.position, Quaternion.identity, transform); Debug.Log(go); go.GetComponent <Text>().text = "+" + bacaSlide.ToString(); Debug.Log("poin slide buku"); PhotonNetwork.LocalPlayer.AddScore(bacaSlide); string namaPlayer = PhotonNetwork.LocalPlayer.NickName; int newPoin = PhotonNetwork.LocalPlayer.GetScore(); //kirim nilai ke server StartCoroutine(webdata.updatePoin(namaPlayer, newPoin)); Debug.Log("Data Terkirim ke Server"); Debug.Log("Poin Terbaru: " + newPoin); // isStoreData = true; // isFirstTime = true; yield return(null); // bingkai.SetActive(false); }
public IEnumerator showfloatingtext() { Debug.Log("show floating"); int nontonInfografis = 50; var go = Instantiate(floatingTextPrefabs, transform.position, Quaternion.identity, transform); Debug.Log(go); go.GetComponent <Text>().text = "+" + nontonInfografis.ToString(); Debug.Log("poin infografis"); PhotonNetwork.LocalPlayer.AddScore(nontonInfografis); string namaPlayer = PhotonNetwork.LocalPlayer.NickName; int newPoin = PhotonNetwork.LocalPlayer.GetScore(); //kirim nilai ke server StartCoroutine(webdata.updatePoin(namaPlayer, newPoin)); Debug.Log("Data Terkirim ke Server"); Debug.Log("Poin Terbaru: " + newPoin); isStoreData = true; isFirstTime = false; yield return(new WaitForSecondsRealtime(2)); bingkai.SetActive(false); }
public void ShowFloatingText() { int nontonVideo = 200; StartCoroutine(missionStatus.ShowFloatingVideo()); // var go = Instantiate(floatingTextPrefabs, transform.position, Quaternion.identity, transform); // Debug.Log(go); // go.GetComponent<Text>().text = "+" + nontonVideo.ToString(); Debug.Log("tampil point tiap klik"); PhotonNetwork.LocalPlayer.AddScore(nontonVideo); Debug.LogWarning("Video Time: " + Mathf.FloorToInt((float)videoPlayer.time)); string namaPlayer = PhotonNetwork.LocalPlayer.NickName; int newPoin = PhotonNetwork.LocalPlayer.GetScore(); //kirim nilai ke server StartCoroutine(webdata.updatePoin(namaPlayer, newPoin)); Debug.Log("Data Terkirim ke Server"); Debug.Log("Poin Terbaru: " + newPoin); }
public void hasilTest() { var hasil = TextDataku; Debug.Log(kelarTest + "Boolean di hasil test"); kelarTest = false; Debug.Log(kelarTest + "Boolean di hasil test"); //if (kelarTest) //{ // Debug.Log("string kebaca"); // completeTest(); //} if (!kelarTest) { Debug.Log(data); nilaiTest = testScore; string namaPlayer = PhotonNetwork.LocalPlayer.NickName; int waktu = Mathf.RoundToInt(waktutotal); // indexSoal = 0; stopUpdateWaktu(); var minutes = Mathf.Floor(waktutotal / 60); var seconds = waktutotal % 60; rekapWaktu.text = "Waktu: " + string.Format("{0:00} : {1:00}", minutes, seconds); rekapScore.text = "Score: " + testScore.ToString(); if (!kirimdata) { //kirim nilai ke server // StartCoroutine(webdata.postNilai(namaPlayer, kodeSoal, nilaiTest)); StartCoroutine(webdata.updateNilai(namaPlayer, kodeSoal, kodeIndikator, nilaiTest)); Debug.Log("Data nilai Terkirim ke Server" + namaPlayer + kodeSoal + nilaiTest); //Kirim waktu StartCoroutine(webdata.updateWaktu(namaPlayer, kodeIndikator, jenisMisi, waktu)); Debug.Log("Data waktu Terkirim ke Server"); kirimdata = true; } //Kirim poin PhotonNetwork.LocalPlayer.AddScore(nilaiTest); int newPoin = PhotonNetwork.LocalPlayer.GetScore(); StartCoroutine(webdata.updatePoin(namaPlayer, newPoin)); Debug.Log("Data poin Terkirim ke Server"); Debug.Log(rekapScore.text + "ini rekap" + rekapWaktu.text); Debug.Log("Congratulation Your Pretest Session is Done"); pretestPanel.SetActive(false); selesaiPanel.SetActive(true); } }