コード例 #1
0
 void OnProgressionColliderHit(ProgressionColliderType type)
 {
     if (type == ProgressionColliderType.Intersection)
     {
         GameController.Instance.LightsRanInLevel++;
         UpdateUI();
     }
 }
コード例 #2
0
ファイル: FuryHandler.cs プロジェクト: dev06/RunTheLights
    void OnProgressionColliderHit(ProgressionColliderType type)
    {
        if (GameController.TutorialEnabled)
        {
            return;
        }

        StopCoroutine("ICheck");

        StartCoroutine("ICheck", type);
    }
コード例 #3
0
ファイル: FuryHandler.cs プロジェクト: dev06/RunTheLights
    void OnProgressionColliderExit(ProgressionColliderType type)
    {
        if (GameController.TutorialEnabled)
        {
            return;
        }

        if (type == ProgressionColliderType.Intersection)
        {
            waitForFury = false;
        }
    }
コード例 #4
0
    void OnProgressionColliderExit(ProgressionColliderType type)
    {
        if (GameController.TutorialEnabled)
        {
            return;
        }

        switch (type)
        {
        case ProgressionColliderType.Intersection:
        {
            wasNearMiss = false;
            break;
        }
        }
    }
コード例 #5
0
    //Called when player hits the finish line, marks begin of level end process.
    private void OnProgressionColliderHit(ProgressionColliderType type)
    {
        if (type == ProgressionColliderType.Zone)
        {
            if (EventManager.OnLevelComplete != null)
            {
                EventManager.OnLevelComplete();
            }
        }

        if (type == ProgressionColliderType.Intersection)
        {
            nextSection = GetSectionByLevel();

            if (GameController.TutorialEnabled)
            {
                if (!TutorialHandler.TutorialStatus)
                {
                    nextSection = GetSection(SectionType.Section_10);
                }
            }
            else
            {
                if (GameController.Instance.LightsRanInLevel > LevelController.CHANGE_LEVEL_EVERY - 3)
                {
                    nextSection = GetSection(SectionType.Section_10);
                }
            }

            Section s = nextSection;

            //	s = GetSection(SectionType.Section_15);

            s.transform.SetParent(transform);

            s.transform.gameObject.SetActive(true);

            lastReservedSection = lastReservedSection == null ? sections[sections.Count - 1] : lastReservedSection;

            s.Move(lastReservedSection);

            lastReservedSection = s;
        }
    }
コード例 #6
0
    void OnProgressionColliderHit(ProgressionColliderType type)
    {
        if (disableAdditionalTexts)
        {
            return;
        }

        if (GameController.TutorialEnabled)
        {
            return;
        }

        float delay = 0f;

        switch (type)
        {
        case ProgressionColliderType.Intersection:
        {
            int multiplier = FuryHandler.InFury ? 2 : 1;

            additionText.TriggerNextText("+" + (5 * multiplier) + " Ran Light!", new Color(1f, .5f, .5f, 1f));

            GameController.SetScore(5 * multiplier);

            delay = .06f;

            if (EventManager.OnLogMapStat != null)
            {
                EventManager.OnLogMapStat(MapUnlockConditions.SpecialConditionType.RanLights, 1);
            }

            if (!wasNearMiss && !FuryHandler.InFury)
            {
                CameraController.Instance.TriggerJerk();
            }

            break;
        }
        }
    }
コード例 #7
0
ファイル: FuryHandler.cs プロジェクト: dev06/RunTheLights
    IEnumerator ICheck(ProgressionColliderType type)
    {
        yield return(new WaitForEndOfFrame());

        if (type == ProgressionColliderType.Intersection)
        {
            if (!InFury)
            {
                Haptic.Instance.VibrateTwice(.15f, HapticIntensity.Light);
            }

            if (canRegisterFury && !waitForFury)
            {
                furyStep++;

                if (!InFury)
                {
                    furyTime = furyStep;
                }

                furyStep = Mathf.Clamp(furyStep, 0, 3);
            }

            furyLightRan++;

            if (furyLightRan >= 3 && canRegisterFury && !furyStarted)
            {
                StartFury();
            }

            if (!InFury && FuryStep >= 1)
            {
                furyMeter.TriggerAnimation();
            }
        }
    }