// Use this for initialization void Start() { gameController = GameObject.FindWithTag("GameController").GetComponent <GameController>(); dazzaController = GameObject.FindWithTag("Player").GetComponent <DazzaController>(); dollaryDoosUI = GameObject.FindWithTag("DollaryDooInGameUI").GetComponent <Text>(); distanceUI = GameObject.FindWithTag("DistanceInGameUI").GetComponent <Text>(); }
// Use this for initialization void Start() { gameController = GameObject.FindWithTag("GameController").GetComponent <GameController>(); dazzaController = GetComponent <DazzaController>(); thisAudioSource = GetComponent <AudioSource>(); powerUpController = GetComponent <PowerUpController>(); }
void Awake() { gameController = GameObject.FindWithTag("GameController").GetComponent <GameController>(); dazzaController = GetComponent <DazzaController>(); shieldCollider = GameObject.FindGameObjectWithTag("ShieldCollider"); magnetCollider = GameObject.FindGameObjectWithTag("MagnetCollider"); speedBoostSoundSource = transform.GetChild(2).GetComponent <AudioSource>(); upgradeController = gameController.GetComponent <UpgradeController>(); }
private void Awake() { gameData = GameObject.Find("DataController").GetComponent <GameData>(); levelGeneration = GameObject.Find("LevelGenerator").GetComponent <LevelGeneration>(); dazzaController = GameObject.FindWithTag("Player").GetComponent <DazzaController>(); upgradeController = GetComponent <UpgradeController>(); soundEffectSource = transform.GetChild(0).GetComponent <AudioSource>(); musicSource = transform.GetChild(1).GetComponent <AudioSource>(); gameData.ApplySelectedSkinFromPlayerPrefs(); dazzaController.GetComponent <SkinController>().SetSkin(gameData.selectedSkin); }
void Start() { // grab references gameController = GameObject.FindWithTag("GameController").GetComponent <GameController>(); dazzaController = GameObject.FindWithTag("Player").GetComponent <DazzaController>(); spawnLocation = GameObject.FindWithTag("ObjectSpawnLocation").transform; CalculateSpeed(); lastGameSpeed = gameController.GetGameSpeed(); nextSpawnTime = UnityEngine.Random.Range(spawnDelayMin, spawnDelayMax); }
// Use this for initialization void Start() { dazzaAnimator = GetComponent <Animator>(); powerUpController = GetComponent <PowerUpController>(); dazzaController = GetComponent <DazzaController>(); ChooseSkin(); for (int i = 0; i < dazzaAnimationStruct.Length; i++) { dazzaAnimationDictionary.Add(dazzaAnimationStruct[i].animation, dazzaAnimationStruct[i].animationBool); } ApplyCorrectAnimation(); }