Master Of Animation, Games & Interactivity
Master Of Animation, Games & Interactivity

Where I'm at Drawing

Week 11 'Where I'm At' drawing for studio 3.

I solved last weeks problem, with a bit of help from my Dad who has more experience in C# and the world of programing than I.

Turns out my hunch about the commad of making the click sound was halfway right. It was failing due to the submit command being executed before it could play.

Code now looks like this;

public void ClickSound()
    {
        //Debug.Log("ClickSound was pressed");


        soundEFX.PlayOneShot(clickEFX);
        StartCoroutine(WaitForSound());
    }

 private IEnumerator WaitForSound()
    {
        //Wait Until Sound has finished playing
        while (soundEFX.isPlaying)
        {
            yield return null;
        }
        var MainMenu = GameObject.Find("MainMenu_Panel");
        //Auidio has finished playing, disable GameObject
        MainMenu.SetActive(false);
    }
 

About This Work

By Maeskye Trigg
Email Maeskye Trigg
Published On: 22/05/2019

academic:

production

mediums:

programmatic

scopes:

major work

tags:

AGI Studio 3, C#, Game, MTrigg, Major Work, s3490713, sketch