void Awake() { player = GameObject.FindGameObjectWithTag("Player"); fossilSystem = player.GetComponent <FossilSystem>(); playerScript = player.GetComponent <PlayerController>(); ingredientManager = player.GetComponent <IngredientManager>(); // Disable panel HidePanel(); }
private void Start() { dead = false; player = GameObject.FindGameObjectWithTag("Player"); playerHealth = player.GetComponent <PlayerController>(); fossilSystem = player.GetComponent <FossilSystem>(); animator = GetComponent <Animator>(); currentHealth = startingHealth; startingPosX = transform.position.x; }
private void Start() { dead = false; player = GameObject.FindGameObjectWithTag("Player"); playerHealth = player.GetComponent <PlayerController>(); fossilSystem = player.GetComponent <FossilSystem>(); animator = GetComponent <Animator>(); currentHealth = startingHealth; startingPosX = transform.position.x; animator.SetBool("Alive", true); // Get the AudioSource of the player Audio = GetComponent <AudioSource>(); }