Created a link to the play menu from the main menu

This commit is contained in:
Anthony Berg 2020-11-30 23:49:57 +00:00
parent f64cf54803
commit 98faaf2290
3 changed files with 13 additions and 1 deletions

View File

@ -9,7 +9,7 @@
<Path>Library/PackageCache/com.unity.ide.visualstudio@2.0.3</Path> <Path>Library/PackageCache/com.unity.ide.visualstudio@2.0.3</Path>
<Path>Library/PackageCache/com.unity.ide.vscode@1.2.3</Path> <Path>Library/PackageCache/com.unity.ide.vscode@1.2.3</Path>
<Path>Library/PackageCache/com.unity.test-framework@1.1.18</Path> <Path>Library/PackageCache/com.unity.test-framework@1.1.18</Path>
<Path>Library/PackageCache/com.unity.textmeshpro@3.0.1</Path> <Path>Library/PackageCache/com.unity.textmeshpro@3.0.3</Path>
<Path>Library/PackageCache/com.unity.timeline@1.3.4</Path> <Path>Library/PackageCache/com.unity.timeline@1.3.4</Path>
<Path>Packages</Path> <Path>Packages</Path>
<Path>ProjectSettings</Path> <Path>ProjectSettings</Path>
@ -20,6 +20,7 @@
<Path>.vs</Path> <Path>.vs</Path>
<Path>Library</Path> <Path>Library</Path>
<Path>Logs</Path> <Path>Logs</Path>
<Path>Temp</Path>
<Path>UserSettings</Path> <Path>UserSettings</Path>
<Path>obj</Path> <Path>obj</Path>
</explicitExcludes> </explicitExcludes>

View File

@ -362,6 +362,8 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
PlayButton: {fileID: 710092055} PlayButton: {fileID: 710092055}
MainMenuUI: {fileID: 409713701}
PlayUI: {fileID: 820348871}
--- !u!1 &514864490 --- !u!1 &514864490
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -7,10 +7,13 @@ public class MainMenu : MonoBehaviour
{ {
public Button PlayButton; //Imports the play button public Button PlayButton; //Imports the play button
public GameObject MainMenuUI;
public GameObject PlayUI;
private string existingProperties; //The variable for the properties private string existingProperties; //The variable for the properties
private string existingCards; private string existingCards;
void Start() { void Start() {
PlayButton.onClick.AddListener(OpenPlayMenu);
Debug.Log("User ID: " + UserManager.userID); Debug.Log("User ID: " + UserManager.userID);
Debug.Log("Username: " + UserManager.username); Debug.Log("Username: " + UserManager.username);
if (!PropertiesHandler.CheckPropertyExists()) //Checks if the properties file doesn't exist. if (!PropertiesHandler.CheckPropertyExists()) //Checks if the properties file doesn't exist.
@ -46,6 +49,12 @@ public class MainMenu : MonoBehaviour
} }
} }
public void OpenPlayMenu()
{
MainMenuUI.SetActive(false);
PlayUI.SetActive(true);
}
public void QuitGame() public void QuitGame()
{ {
Debug.Log("QUIT!"); Debug.Log("QUIT!");