Komplett mit Audio, Fehler beim Start der Spielszenen: standardHealth und standardEnergy werden nicht wie gewollt übermittelt
This commit is contained in:
@@ -33,6 +33,7 @@ public class GameOver : MonoBehaviour
|
||||
[SerializeField] GameObject eFie;
|
||||
[SerializeField] GameObject eSilv;
|
||||
[SerializeField] GameObject eHai;
|
||||
[SerializeField] GameObject audioScript;
|
||||
|
||||
|
||||
InventoryScript inventory;
|
||||
@@ -42,6 +43,7 @@ public class GameOver : MonoBehaviour
|
||||
SilvScript silv;
|
||||
HaiScript hai;
|
||||
LevelBehavior level;
|
||||
AudioManager audio;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@@ -52,12 +54,12 @@ public class GameOver : MonoBehaviour
|
||||
hai = eHai.GetComponent<HaiScript>();
|
||||
silv = eSilv.GetComponent<SilvScript>();
|
||||
level = levelScript.GetComponent<LevelBehavior>();
|
||||
audio = audioScript.GetComponent<AudioManager>();
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
timer = 10f;
|
||||
inventory.Gems = 599;
|
||||
deathPanel.SetActive(false);
|
||||
}
|
||||
|
||||
@@ -76,6 +78,7 @@ public class GameOver : MonoBehaviour
|
||||
|
||||
public void ShowDeathScreen()
|
||||
{
|
||||
audio.PlaySFX(audio.death);
|
||||
//Time.timeScale = 0;
|
||||
timerOn = true;
|
||||
timer = 10f;
|
||||
@@ -118,6 +121,7 @@ public class GameOver : MonoBehaviour
|
||||
Debug.Log(inventory.Gems);
|
||||
timerOn = false;
|
||||
timer = 10f;
|
||||
audio.PlaySFX(audio.rearrange);
|
||||
}
|
||||
|
||||
else //EINBAUEN, DASS MAN DORT GEMS KAUFEN KANN
|
||||
@@ -215,16 +219,16 @@ public class GameOver : MonoBehaviour
|
||||
public void SpeakEnemy()
|
||||
{
|
||||
|
||||
if (fie.fieKill)
|
||||
if (fie.fieKill == true)
|
||||
{
|
||||
infoText.text = "HAAHAHAHAHAAHAHAHAHAHAHAHAHA";
|
||||
}
|
||||
|
||||
if (silv.silvKill)
|
||||
if (silv.silvKill == true)
|
||||
{
|
||||
infoText.text = "Oh no, I accidently killed someone again. I'm sowy. I just wanted to hug you :(";
|
||||
}
|
||||
if (hai.haiKill)
|
||||
if (hai.haiKill == true)
|
||||
{
|
||||
infoText.text = "You sound great...";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user