Пример #1
0
    public virtual void PlayerBoost(FirstPersonController character)
    {
        // Reset player stats if this platform is a sky platform
        if (m_PlatformType == PlatformType.Sky)
        {
            GameStates.ScoreBreakpoints = false;
            GameManager.Current.ResetStreak(callEvent: true, resetStreak: false);
        }
        else
        {
            GameStates.ScoreBreakpoints = true;
        }

        m_ApplyForceFlag = character.ApplyForce(transform.up * m_ForceFactor);
        if (m_ApplyForceFlag)
        {
            var platformID = gameObject.GetInstanceID();
            GameManager.Current.AddScore(m_ScoreValue, m_PlatformType, platformID);
            m_AudioSource.pitch = Random.Range(m_SoundPitchLow, m_SoundPitchHigh);
            m_AudioSource.Play();
        }
    }