// Use this for initialization void Start() { anim = GetComponent <Animator>(); rigBody = GetComponent <Rigidbody2D>(); girlHealth = FindObjectOfType <GirlHealth>(); isFacingRight = true; //Pops up question when collide with sign gameController = FindObjectOfType <GameController>(); questionPanel.gameObject.SetActive(false); gameController.UpdateScore(0); endDisplay.SetActive(false); }
/// <summary> /// initialize object variance /// </summary> void Start() { dataController = FindObjectOfType <DataController>(); correct = GetComponent <AudioSource>(); currentRoundData = dataController.GetCurrentRoundData(); questionPool = currentRoundData.questions; characterHealth = FindObjectOfType <CharacterHealth>(); characterController = FindObjectOfType <CharacterController>(); girlHealth = FindObjectOfType <GirlHealth>(); girlController = FindObjectOfType <GirlController>(); //ShowQuestion(); }