Пример #1
0
    // 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>();
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        gameController  = GameObject.FindWithTag("GameController").GetComponent <GameController>();
        dazzaController = GetComponent <DazzaController>();

        thisAudioSource = GetComponent <AudioSource>();

        powerUpController = GetComponent <PowerUpController>();
    }
Пример #3
0
    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>();
    }
Пример #4
0
    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);
    }
Пример #5
0
    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);
    }
Пример #6
0
    // 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();
    }