void Awake() { Transform playerTransform = player.GetComponent <Transform>(); Vector3 startPosition = InfoHolder.GetBarPosition(); if (!InfoHolder.GetLastScene().Equals("Map") && startPosition != Vector3.zero) { playerTransform.position = startPosition; } }
void Awake() { if (InfoHolder.playerInfoLoaded && InfoHolder.GetLastScene().Equals("Versier") && InfoHolder.GetEnemyInfo().GetNaam().Equals(gameObject.name)) { charInfo = InfoHolder.GetEnemyInfo(); } else { charInfo = gameObject.GetComponent <CharInfo>(); } }
IEnumerator endGame() { movable = false; pooIsland.MoveOutOfSight(); spaceBar.SetActive(false); yield return(new WaitForSeconds(3f)); fadeAnim.SetTrigger("fadeout"); yield return(new WaitForSeconds(1.2f)); GameObject.FindGameObjectWithTag("GameController").GetComponent <MasterController>().SetPoepWaarde(-30); SceneManager.LoadScene(InfoHolder.GetLastScene()); }