remove coins txt
This commit is contained in:
parent
671c2d35e9
commit
beba661515
@ -34,12 +34,13 @@ public class GameController : MonoBehaviour
|
||||
instance = this;
|
||||
DontDestroyOnLoad(this.gameObject);
|
||||
SceneManager.activeSceneChanged += ChangedScene;
|
||||
coinText.text = "0";
|
||||
if(!SceneManager.GetActiveScene().name.Equals(mainScene) && !SceneManager.GetActiveScene().name.Equals(endScene)){
|
||||
coinText.gameObject.SetActive(false);
|
||||
}else{
|
||||
coinText.gameObject.SetActive(true);
|
||||
}
|
||||
coinText.gameObject.SetActive(false);
|
||||
// coinText.text = "0";
|
||||
// if(!SceneManager.GetActiveScene().name.Equals(mainScene) && !SceneManager.GetActiveScene().name.Equals(endScene)){
|
||||
// coinText.gameObject.SetActive(false);
|
||||
// }else{
|
||||
// coinText.gameObject.SetActive(true);
|
||||
// }
|
||||
audioSource = GetComponent<AudioSource>();
|
||||
}else{
|
||||
Destroy(this.gameObject);
|
||||
@ -50,7 +51,7 @@ public class GameController : MonoBehaviour
|
||||
public void AddCoins(int amount){
|
||||
//This should not be like this. Collectible should call the player that hit it and add to their amount
|
||||
coinAmount += amount;
|
||||
coinText.text = coinAmount.ToString();
|
||||
//coinText.text = coinAmount.ToString();
|
||||
}
|
||||
|
||||
|
||||
@ -79,11 +80,11 @@ public class GameController : MonoBehaviour
|
||||
|
||||
private void ChangedScene(Scene curr, Scene next){
|
||||
fadeCoroutine = StartCoroutine(FadeToBlack(string.Empty, false, fadeSpeed));
|
||||
if(!next.name.Equals(mainScene) && !next.name.Equals(endScene)){
|
||||
coinText.gameObject.SetActive(false);
|
||||
}else{
|
||||
coinText.gameObject.SetActive(true);
|
||||
}
|
||||
// if(!next.name.Equals(mainScene) && !next.name.Equals(endScene)){
|
||||
// coinText.gameObject.SetActive(false);
|
||||
// }else{
|
||||
// coinText.gameObject.SetActive(true);
|
||||
// }
|
||||
}
|
||||
|
||||
public IEnumerator FadeToBlack(string sceneToLoad,bool fadeToBlack = true, float fadeSpeed = 2.5f){
|
||||
|
||||
@ -8,12 +8,6 @@ EditorBuildSettings:
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/MainMenu.unity
|
||||
guid: af63aef6e17277b44ade3df35992db53
|
||||
- enabled: 0
|
||||
path: Assets/Scenes/Dev.unity
|
||||
guid: 739ca6d2c9f3b5b4a8885b94cf11f074
|
||||
- enabled: 0
|
||||
path: Assets/Scenes/GameLogic.unity
|
||||
guid: 6c735b8f44735c84789efdc5bc7c8d2d
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/LevelDesign.unity
|
||||
guid: 4b213b8915c09ca49873cfadc143c61b
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user