Ejemplo n.º 1
0
        /// <summary>
        /// On Play we animate our softness
        /// </summary>
        /// <param name="position"></param>
        /// <param name="feedbacksIntensity"></param>
        protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
        {
            if (TargetTMPText == null)
            {
                return;
            }

            if (Active)
            {
                switch (Mode)
                {
                case MMFeedbackBase.Modes.Instant:
                    TargetTMPText.fontMaterial.SetFloat(ShaderUtilities.ID_OutlineSoftness, InstantSoftness);
                    TargetTMPText.UpdateMeshPadding();
                    break;

                case MMFeedbackBase.Modes.OverTime:
                    if (!AllowAdditivePlays && (_coroutine != null))
                    {
                        return;
                    }
                    _coroutine = Owner.StartCoroutine(ApplyValueOverTime());
                    break;
                }
            }
        }