Hi, someone can help me, Resume and Pause in the Void Uptade don’t linking in the Void Resume and Void Pause. Why?
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Threading;
using UnityEngine;
public class Pause : MonoBehaviour
{
public static bool GameIsPaused = false;
public GameObject PauseMenuUI;
}
void Resume()
{
PauseMenuUI.SetActive(false);
Time.timeScale = 1f;
GameIsPaused = false;
}
void Pause()
{
pauseMenuUI.SetActive(true);
Time.timeScale = 0f;
GameIsPaused = true;
}
void Update()
{
if (Input.GetKeyDown(KeyCode.P))
{
Resume();
}
else
{
Pause();
}
}
The Error CS0116: A namespace cannot directly contain members such as fields or methods