private void OnTriggerEnter(Collider other) { var player = other.GetComponent <PlatformPlayer>(); if (player != null) { PitchPlatformerEvents.OnReachedGoal(); Instantiate(GoalReachedParticle, transform); } }
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(); }
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; } }