Menu camera
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,9 @@ public class UiController : MonoBehaviour
|
||||
public TextMeshProUGUI uiDistance;
|
||||
public TextMeshProUGUI uiHighScore;
|
||||
|
||||
public GameObject menuCamera;
|
||||
public GameObject playerCamera;
|
||||
|
||||
public static float distance = 0;
|
||||
public static int highScore = 0;
|
||||
private float oldDistance = 0.0f;
|
||||
@@ -23,6 +26,11 @@ public class UiController : MonoBehaviour
|
||||
|
||||
UiController.LoadGame();
|
||||
}
|
||||
public void OnStartGameBtnClick()
|
||||
{
|
||||
menuCamera.SetActive(false);
|
||||
playerCamera.SetActive(true);
|
||||
}
|
||||
public static void SaveGame()
|
||||
{
|
||||
if (UiController.distance > UiController.highScore)
|
||||
|
@@ -7,7 +7,7 @@ public class gizmoManager : MonoBehaviour
|
||||
|
||||
void OnDrawGizmos()
|
||||
{
|
||||
if (!this.gameObject.transform.parent.name.Contains("chunk"))
|
||||
if (this.gameObject != null && !this.gameObject.transform.parent.name.Contains("chunk"))
|
||||
{
|
||||
Bounds bounds = GetChildRendererBounds(gameObject);
|
||||
Gizmos.DrawWireCube(bounds.center, bounds.size);
|
||||
|
Reference in New Issue
Block a user