Resolve WES-43 "Minigame framework"

This commit is contained in:
Dries Van Schuylenbergh
2023-03-06 12:14:25 +00:00
parent f670c0cd0a
commit 9eebf4e4f2
34 changed files with 3092 additions and 2354 deletions

View File

@@ -20,7 +20,7 @@ public class StartPause : MonoBehaviour
private int word_i = 0;
// In my example, i have 4 videos/images
private int max_words = 4;
// Start is called before the first frame update
public void Awake()
{
@@ -71,7 +71,7 @@ public class StartPause : MonoBehaviour
col.a = 255;
button.image.color = col;
}
}
}
// Press next-sign button for next word
public void NextSign(){

View File

@@ -25,8 +25,10 @@ public class Webcam : MonoBehaviour
tex.Play();
}
public void SwapCam(){
if(WebCamTexture.devices.Length > 0){
public void SwapCam()
{
if (WebCamTexture.devices.Length > 0)
{
// Stop the old camera
display.texture = null;
tex.Stop();
@@ -44,8 +46,10 @@ public class Webcam : MonoBehaviour
tex.Play();
}
}
// Scene changing is implemented here to avoid problems with webcam
public void loadScene(string sceneName) {
public void LoadScene(string sceneName)
{
display.texture = null;
tex.Stop();
tex = null;