// Use this for initialization void Start() { transform.localScale = new Vector3(0, 0, 0); AudioSource[] audioSources = GetComponents <AudioSource>(); audioBtnClick = audioSources[0]; audioBubbleAppear = audioSources[1]; audioBubbleDisappear = audioSources[2]; audioStarAppear = audioSources[3]; buttonPrev.gameObject.SetActive(false); buttonOk.gameObject.SetActive(false); SetState(0); // Init current level controller. levelController = LevelController.GetCurrentLevelController(); tutHotPototoCtrl = FindObjectOfType <TutorialControllerHotPotato>(); tutGreedyCtrl = FindObjectOfType <TutorialControllerGreedy>(); levelControllerPlatform = FindObjectOfType <LevelControllerPlatform>(); gameObject.SetActive(false); lastState = false; imageStar1.gameObject.SetActive(false); imageStar2.gameObject.SetActive(false); imageStar3.gameObject.SetActive(false); textLevel.gameObject.SetActive(false); textScore.gameObject.SetActive(false); animateScore = false; currentScore = 0; }
// Use this for initialization void Start() { sr = GetComponent <SpriteRenderer>(); levelController = FindObjectOfType <LevelControllerPlatform>(); ms = levelController.GetPlayerMovementScript(); soundManager = FindObjectOfType <SoundManager>(); }
// Use this for initialization void Start() { levelController = FindObjectOfType <LevelControllerPlatform>(); rb = GetComponent <Rigidbody2D>(); ms = levelController.GetPlayerMovementScript(); speed = Random.Range(1, 4); soundManager = FindObjectOfType <SoundManager>(); }