|
|
@ -12,7 +12,7 @@ public class GameManager : MonoBehaviour
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public static GameManager Instance { get; private set; }
|
|
|
|
public static GameManager Instance { get; private set; }
|
|
|
|
|
|
|
|
|
|
|
|
public GameObject foregroundCanvas;
|
|
|
|
public GameObject foregroundCanvas;
|
|
|
|
public GameObject backgroundCanvas;
|
|
|
|
public GameObject backgroundCanvas;
|
|
|
|
|
|
|
|
|
|
|
|
public GameObject spriteToFade;
|
|
|
|
public GameObject spriteToFade;
|
|
|
@ -74,7 +74,7 @@ public class GameManager : MonoBehaviour
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Instance = this;
|
|
|
|
Instance = this;
|
|
|
|
DontDestroyOnLoad(gameObject);
|
|
|
|
DontDestroyOnLoad(gameObject);
|
|
|
|
DontDestroyOnLoad(foregroundCanvas);
|
|
|
|
DontDestroyOnLoad(foregroundCanvas);
|
|
|
|
DontDestroyOnLoad(backgroundCanvas);
|
|
|
|
DontDestroyOnLoad(backgroundCanvas);
|
|
|
|
DontDestroyOnLoad(events);
|
|
|
|
DontDestroyOnLoad(events);
|
|
|
|
DontDestroyOnLoad(player);
|
|
|
|
DontDestroyOnLoad(player);
|
|
|
@ -82,7 +82,7 @@ public class GameManager : MonoBehaviour
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Destroy(gameObject);
|
|
|
|
Destroy(gameObject);
|
|
|
|
Destroy(foregroundCanvas);
|
|
|
|
Destroy(foregroundCanvas);
|
|
|
|
Destroy(backgroundCanvas);
|
|
|
|
Destroy(backgroundCanvas);
|
|
|
|
|
|
|
|
|
|
|
|
Destroy(events);
|
|
|
|
Destroy(events);
|
|
|
@ -100,7 +100,7 @@ public class GameManager : MonoBehaviour
|
|
|
|
|
|
|
|
|
|
|
|
sound = GetComponent<AudioSource>();
|
|
|
|
sound = GetComponent<AudioSource>();
|
|
|
|
//GameManager.Instance.enablePowerup(3);
|
|
|
|
//GameManager.Instance.enablePowerup(3);
|
|
|
|
GameManager.Instance.enablePowerup(3);
|
|
|
|
//GameManager.Instance.enablePowerup(3);
|
|
|
|
artActivated = new bool[art.Length];
|
|
|
|
artActivated = new bool[art.Length];
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < art.Length; i++)
|
|
|
|
for (int i = 0; i < art.Length; i++)
|
|
|
@ -180,9 +180,9 @@ public class GameManager : MonoBehaviour
|
|
|
|
public void HideDialog()
|
|
|
|
public void HideDialog()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
dialogBox.SetActive(false);
|
|
|
|
dialogBox.SetActive(false);
|
|
|
|
artImage.SetActive(false);
|
|
|
|
artImage.SetActive(false);
|
|
|
|
//hideGalleryButton.SetActive(false);
|
|
|
|
//hideGalleryButton.SetActive(false);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -196,7 +196,7 @@ public class GameManager : MonoBehaviour
|
|
|
|
healthbar.SetActive(true);
|
|
|
|
healthbar.SetActive(true);
|
|
|
|
powerUps.SetActive(true);
|
|
|
|
powerUps.SetActive(true);
|
|
|
|
pauseButton.SetActive(true);
|
|
|
|
pauseButton.SetActive(true);
|
|
|
|
disableAllPowerups();
|
|
|
|
disableAllPowerups();
|
|
|
|
player.SetActive(true);
|
|
|
|
player.SetActive(true);
|
|
|
|
LoadLevel(sceneToLoad, positionToLoad);
|
|
|
|
LoadLevel(sceneToLoad, positionToLoad);
|
|
|
|
disableAllPowerups();
|
|
|
|
disableAllPowerups();
|
|
|
@ -318,9 +318,9 @@ public class GameManager : MonoBehaviour
|
|
|
|
healthbar.SetActive(false);
|
|
|
|
healthbar.SetActive(false);
|
|
|
|
powerUps.SetActive(false);
|
|
|
|
powerUps.SetActive(false);
|
|
|
|
HideDialog();
|
|
|
|
HideDialog();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool isPaused()
|
|
|
|
public bool isPaused()
|
|
|
|