Example #1
0
    // Use this for initialization
    void Start()
    {
        FingerGestures.OnFingerTap       += FingerGestures_OnFingerTap;
        FingerGestures.OnFingerDragBegin += FingerGestures_OnFingerDragBegin;
        FingerGestures.OnFingerDragMove  += FingerGestures_OnFingerDragMove;
        FingerGestures.OnFingerDragEnd   += FingerGestures_OnFingerDragEnd;

        Vector3 curPos = flowersLayer.transform.position;

        curPos.x = -640;
        flowersLayer.transform.position = curPos;

        backgroundLayer = background.GetComponent <BWDiagonalBackgroundLayer>();
        foregroundLayer = foreground.GetComponent <BWDiagonalForegroundLayer>();

        if (PlayerPrefs.GetInt("beeTutorialPlayed") > 0)
        {
            currentCategoryIndex = UnityEngine.Random.Range(0, 2);
        }
        else
        {
            currentCategoryIndex = 0;
        }

        dataManager = new BWDataManager(AGGameIndex.k_Beeworld_CoutingUpDown, currentCategoryIndex, progression.text);

        AudioClip introClip = introAudioClips[UnityEngine.Random.Range(0, introAudioClips.Length)];

        currentClips = new List <AudioClip>();
        currentClips.Add(introClip);

        voiceOverSource = AddAudio(null, false, false, 1.0f);
        soundEffects    = AddAudio(null, false, false, 1.0f);

        questionsInSession = -1;
        nextQuestion();
    }
    // Use this for initialization
    void Start()
    {
        FingerGestures.OnFingerTap += FingerGestures_OnFingerTap;
        FingerGestures.OnFingerDragBegin += FingerGestures_OnFingerDragBegin;
        FingerGestures.OnFingerDragMove += FingerGestures_OnFingerDragMove;
        FingerGestures.OnFingerDragEnd += FingerGestures_OnFingerDragEnd;

        Vector3 curPos = flowersLayer.transform.position;
        curPos.x = -640;
        flowersLayer.transform.position = curPos;

        backgroundLayer = background.GetComponent<BWDiagonalBackgroundLayer>();
        foregroundLayer = foreground.GetComponent<BWDiagonalForegroundLayer>();

        if(PlayerPrefs.GetInt("beeTutorialPlayed") > 0) {
            currentCategoryIndex = UnityEngine.Random.Range(0,2);
        } else {
            currentCategoryIndex = 0;
        }

        dataManager = new BWDataManager(AGGameIndex.k_Beeworld_CoutingUpDown, currentCategoryIndex, progression.text);

        AudioClip introClip = introAudioClips[UnityEngine.Random.Range(0,introAudioClips.Length)];

        currentClips = new List<AudioClip>();
        currentClips.Add(introClip);

        voiceOverSource = AddAudio(null, false, false, 1.0f);
        soundEffects = AddAudio(null, false, false, 1.0f);

        questionsInSession = -1;
        nextQuestion();
    }