Exemplo n.º 1
0
        private void OnTriggerEnter(Collider other)
        {
            var player = other.GetComponent <PlatformPlayer>();

            if (player != null)
            {
                PitchPlatformerEvents.OnReachedGoal();
                Instantiate(GoalReachedParticle, transform);
            }
        }
Exemplo n.º 2
0
        public void Show()
        {
            gameObject.SetActive(true);
            foreach (var platform in m_Platforms)
            {
                platform.StopListen();
                platform.DisablePlatform();
            }

            PitchPlatformerEvents.PlatformFinishedEvent += GoToNextPlatform;
            MicrophoneManager.Instance.StartRecording();

            m_CurrentPlatformIndex = -1;
            GoalCollider.enabled   = false;
            GoToNextPlatform();
            PitchPlatformerEvents.OnShowLevel();
        }
Exemplo n.º 3
0
        private void BuildPlatform()
        {
            if (!m_BuildingPlatform)
            {
                return;
            }

            var currentValue = m_Material.GetFloat("_DissolveValue");

            if (currentValue < 1f)
            {
                m_Material.SetFloat("_DissolveValue", Mathf.Clamp01(currentValue - m_StepSize / 10f));
            }
            else
            {
                StopListen();
                EnablePlatform();
                PitchPlatformerEvents.OnPlatformFinished();
                m_BuildingPlatform = false;
            }
        }