// Start is called before the first frame update void Start() { score = 0; numberOfItemsNeeded = 5; scoreText.text = "Items: " + score + "/" + numberOfItemsNeeded; finalScoreHandler = (FinalScoreHandler)GameObject.FindObjectOfType(typeof(FinalScoreHandler)); }
// Start is called before the first frame update void Start() { direction = 0; animator = gameObject.GetComponent <Animator>(); audio = gameObject.GetComponent <AudioSource>(); PlayRolling(); canMoveLeft = true; canMoveRight = true; sceneMover = (SceneMovementManager)GameObject.FindObjectOfType(typeof(SceneMovementManager)); choiceMenu = (ChoiceMenu)GameObject.FindObjectOfType(typeof(ChoiceMenu)); finalScore = (FinalScoreHandler)GameObject.FindObjectOfType(typeof(FinalScoreHandler)); }