mirror of
https://github.com/Project-Redacted/project-hampter.git
synced 2025-06-26 20:16:17 +00:00
Update :3
This commit is contained in:
parent
1f50b3f262
commit
6bbd56a5cf
759 changed files with 269694 additions and 37600 deletions
20
Assets/MainMenuStuffs/ButtonScript.cs
Normal file
20
Assets/MainMenuStuffs/ButtonScript.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using System.Collections;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class ButtonScript : MonoBehaviour
|
||||
{
|
||||
public Button yourButton;
|
||||
public string nextSceneName;
|
||||
void Start()
|
||||
{
|
||||
Button button = yourButton.GetComponent<Button>();
|
||||
button.onClick.AddListener(OnClick);
|
||||
}
|
||||
|
||||
void OnClick()
|
||||
{
|
||||
SceneManager.LoadScene(nextSceneName); // load the next scene
|
||||
}
|
||||
}
|
11
Assets/MainMenuStuffs/ButtonScript.cs.meta
Normal file
11
Assets/MainMenuStuffs/ButtonScript.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5900040c73b305b43a2dd14d1da793f6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
45
Assets/MainMenuStuffs/MenuScript.cs
Normal file
45
Assets/MainMenuStuffs/MenuScript.cs
Normal file
|
@ -0,0 +1,45 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class MenuScript : MonoBehaviour
|
||||
{
|
||||
// Scene changer
|
||||
public void Difficulty()
|
||||
{
|
||||
SceneManager.LoadScene("TempDiffScene");
|
||||
}
|
||||
public void MainMenu()
|
||||
{
|
||||
SceneManager.LoadScene("TempMainMenu");
|
||||
}
|
||||
public void Settings()
|
||||
{
|
||||
SceneManager.LoadScene("Settings");
|
||||
}
|
||||
public void Easy()
|
||||
{
|
||||
SceneManager.LoadScene("25x25Scene");
|
||||
Time.timeScale = 1f;
|
||||
}
|
||||
public void Medium()
|
||||
{
|
||||
SceneManager.LoadScene("35x35Scene");
|
||||
Time.timeScale = 1f;
|
||||
}
|
||||
public void Hard()
|
||||
{
|
||||
SceneManager.LoadScene("50x50Scene");
|
||||
Time.timeScale = 1f;
|
||||
}
|
||||
|
||||
|
||||
// Buttons
|
||||
public void ExitGame()
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
}
|
11
Assets/MainMenuStuffs/MenuScript.cs.meta
Normal file
11
Assets/MainMenuStuffs/MenuScript.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b2bd87d39c94b544682b266e487e3550
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
45
Assets/MainMenuStuffs/MenuScript1.cs
Normal file
45
Assets/MainMenuStuffs/MenuScript1.cs
Normal file
|
@ -0,0 +1,45 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Audio;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class MenuScript1 : MonoBehaviour
|
||||
{
|
||||
// Scene changer
|
||||
public void Difficulty()
|
||||
{
|
||||
SceneManager.LoadScene("TempDiffScene");
|
||||
}
|
||||
public void MainMenu()
|
||||
{
|
||||
SceneManager.LoadScene("TempMainMenu");
|
||||
}
|
||||
public void Settings()
|
||||
{
|
||||
SceneManager.LoadScene("Settings");
|
||||
}
|
||||
public void Easy()
|
||||
{
|
||||
SceneManager.LoadScene("25x25Scene");
|
||||
Time.timeScale = 1f;
|
||||
}
|
||||
public void Medium()
|
||||
{
|
||||
SceneManager.LoadScene("35x35Scene");
|
||||
Time.timeScale = 1f;
|
||||
}
|
||||
public void Hard()
|
||||
{
|
||||
SceneManager.LoadScene("50x50Scene");
|
||||
Time.timeScale = 1f;
|
||||
}
|
||||
|
||||
|
||||
// Buttons
|
||||
public void ExitGame()
|
||||
{
|
||||
Application.Quit();
|
||||
}
|
||||
|
||||
}
|
11
Assets/MainMenuStuffs/MenuScript1.cs.meta
Normal file
11
Assets/MainMenuStuffs/MenuScript1.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 04e3d33933c09d9448cc0329d95182c9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
52
Assets/MainMenuStuffs/PauseMenu.cs
Normal file
52
Assets/MainMenuStuffs/PauseMenu.cs
Normal file
|
@ -0,0 +1,52 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class PauseMenu : MonoBehaviour
|
||||
{
|
||||
|
||||
public bool GameIsPaused = false;
|
||||
|
||||
public GameObject pauseMenuUI;
|
||||
|
||||
|
||||
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
if (GameIsPaused == true)
|
||||
{
|
||||
Resume();
|
||||
}
|
||||
else
|
||||
{
|
||||
Pause();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void Resume ()
|
||||
{
|
||||
pauseMenuUI.SetActive(false);
|
||||
Time.timeScale = 1f;
|
||||
GameIsPaused = false;
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
}
|
||||
void Pause ()
|
||||
{
|
||||
pauseMenuUI.SetActive(true);
|
||||
Time.timeScale = 0f;
|
||||
GameIsPaused = true;
|
||||
Cursor.lockState = CursorLockMode.None;
|
||||
Cursor.visible = true;
|
||||
}
|
||||
|
||||
}
|
11
Assets/MainMenuStuffs/PauseMenu.cs.meta
Normal file
11
Assets/MainMenuStuffs/PauseMenu.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0b2bd4a694b71ec4a928ed55edee2a20
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
52
Assets/MainMenuStuffs/PauseMenu1.cs
Normal file
52
Assets/MainMenuStuffs/PauseMenu1.cs
Normal file
|
@ -0,0 +1,52 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class PauseMenu1 : MonoBehaviour
|
||||
{
|
||||
|
||||
public bool GameIsPaused = false;
|
||||
|
||||
public GameObject pauseMenuUI;
|
||||
|
||||
|
||||
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
{
|
||||
if (GameIsPaused == true)
|
||||
{
|
||||
Resume();
|
||||
}
|
||||
else
|
||||
{
|
||||
Pause();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void Resume ()
|
||||
{
|
||||
pauseMenuUI.SetActive(false);
|
||||
Time.timeScale = 1f;
|
||||
GameIsPaused = false;
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
}
|
||||
void Pause ()
|
||||
{
|
||||
pauseMenuUI.SetActive(true);
|
||||
Time.timeScale = 0f;
|
||||
GameIsPaused = true;
|
||||
Cursor.lockState = CursorLockMode.None;
|
||||
Cursor.visible = true;
|
||||
}
|
||||
|
||||
}
|
11
Assets/MainMenuStuffs/PauseMenu1.cs.meta
Normal file
11
Assets/MainMenuStuffs/PauseMenu1.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: cf6e70d1c2e88b64d82af1bb486e8be9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
19
Assets/MainMenuStuffs/UnlockCursor.cs
Normal file
19
Assets/MainMenuStuffs/UnlockCursor.cs
Normal file
|
@ -0,0 +1,19 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class UnlockCursor : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
Cursor.visible = true;
|
||||
Cursor.lockState = CursorLockMode.None;
|
||||
}
|
||||
}
|
11
Assets/MainMenuStuffs/UnlockCursor.cs.meta
Normal file
11
Assets/MainMenuStuffs/UnlockCursor.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 87c25f7f0c9f41a4aaf46ad2d886a8ab
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue