Manage Protesting VR

Manage Protesting application of VR
Manage Protesting application of VR

This simulation is designed to train the participants, called cadets, to manage and learn how to behave in a protesting environment by taking care of interactions with crowd and trying to maintain the feedback better with Score.

CODE

Here's the code of Game Manager script


public class GameManager : MonoBehaviour
{
    private AudioSource audio;
    public AudioClip[] audioClips, audioClips2;
    public AudioClip audioClips3;
    public TMP_Text Score, Feedback;
    private int score;
    private string feedback;
    void Start()
    {
        audio = GetComponent<AudioSource>();
    }


    void Update()
    {
        Get_Feedback();
        IncrementText();
    }
    public void PlayRandomClip()
    {
        score++;
        int randomIndex = Random.Range(0, audioClips.Length);
        AudioClip randomClip = audioClips[randomIndex];
        audio.clip = randomClip;
        audio.Play();
    }
    public void PlayRandomClip2()
    {
        score++;
        int randomIndex = Random.Range(0, audioClips2.Length);
        AudioClip randomClip = audioClips2[randomIndex];
        audio.clip = randomClip;
        audio.Play();
    }
    public void Emotional_support()
    {
        score++;
        audio.clip = audioClips3;
        audio.Play();
    }
    void IncrementText()
    {
        Score.text = score.ToString();
        Feedback.text = feedback.ToString();

    }
    void Get_Feedback()
    {
        if (score < 2)
        {
            feedback = "Effortless";
        }
        if (score >= 2 && score < 7)
        {
            feedback = "Doing Well";
        }
        if (score > 6 )
        {
            feedback = "Excellent";
        }
    }
}

Made in UNITY