#Alright! I have to leave now in 10
1 messages ยท Page 1 of 1 (latest)
Alright!
I am gonna send you the code now
{
yield return new WaitForSecondsRealtime(loadDelay);
if (gameManager.currentState == GameManager.GameState.Paused)
{
gameManager.currentState = GameManager.GameState.Playing;
gameManager.pauseMenuScreen.SetActive(false);
audioManager.mainGameMusicAudioSource.UnPause();
Debug.Log("Continue button is pressed and pause menu screen gone!");
}
}```
so we have buttons right:
I am pausing with a key and unpausing with both
I am pausing with a key Escape and unpausing with Escape and resume button
It is a game object
Where I am disabling and enabling it
{
StartCoroutine(ContinueGameAfterDelay());
}
IEnumerator ContinueGameAfterDelay()
{
yield return new WaitForSecondsRealtime(loadDelay);
if (gameManager.currentState == GameManager.GameState.Paused)
{
gameManager.currentState = GameManager.GameState.Playing;
gameManager.pauseMenuScreen.SetActive(false);
audioManager.mainGameMusicAudioSource.UnPause();
Debug.Log("Continue button is pressed and pause menu screen gone!");
}
}
public void InputForPauseMenuScreen()
{
// Check the current game state!
if (gameManager != null && gameManager.currentState != GameManager.GameState.GameOver)
{
if (Input.GetKeyDown(KeyCode.Escape))
{
if (gameManager.currentState == GameManager.GameState.Playing)
{
gameManager.PauseGame();
}
else
{
gameManager.ResumeGame();
}
}
}```
Here is the code for resume button and input for pause menu with the escape button
by default it has the white color
and colour changes only when you click resume
first time but never reverts
to its original white correct ?
I will try to send you video now give me a minute
and you dont assign colour anywhere in script ye
aye
if u want u can call me
and share screen tbh
that be quicker
if u short on time ๐
Next time if I will have a problem we will join I am leaving like 10:30 I will add you you seem to be a nice guy ๐
This is "New Recording - 1/29/2024, 10:26:21 PM" by Stelios on Vimeo, the home for high quality videos and the people who love them.