Add formatting rules
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.SceneManagement;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class Webcam : MonoBehaviour
|
||||
{
|
||||
@@ -13,7 +13,8 @@ public class Webcam : MonoBehaviour
|
||||
public GameObject popup;
|
||||
public TextMeshProUGUI dynamic;
|
||||
|
||||
void Awake(){
|
||||
void Awake()
|
||||
{
|
||||
popup.SetActive(false);
|
||||
|
||||
WebCamDevice device = WebCamTexture.devices[camdex];
|
||||
@@ -55,20 +56,25 @@ public class Webcam : MonoBehaviour
|
||||
SceneManager.LoadScene(sceneName);
|
||||
}
|
||||
|
||||
public void Show_feedback(){
|
||||
if(popup.activeSelf){
|
||||
public void Show_feedback()
|
||||
{
|
||||
if (popup.activeSelf)
|
||||
{
|
||||
dynamic.text = "";
|
||||
popup.SetActive(false);
|
||||
return;
|
||||
}
|
||||
double index = UnityEngine.Random.value;
|
||||
if(index < 0.5){
|
||||
if (index < 0.5)
|
||||
{
|
||||
dynamic.text = "Poor";
|
||||
}
|
||||
else if(index > 0.8){
|
||||
else if (index > 0.8)
|
||||
{
|
||||
dynamic.text = "Excellent";
|
||||
}
|
||||
else{
|
||||
else
|
||||
{
|
||||
dynamic.text = "Good";
|
||||
}
|
||||
popup.SetActive(true);
|
||||
|
||||
Reference in New Issue
Block a user