Exemplo n.º 1
0
        /// <summary>
        /// Waits for 2 seconds, then kills the ball object after having played the MMFeedbacks
        /// </summary>
        /// <returns></returns>
        protected virtual IEnumerator ProgrammedDeath()
        {
            yield return(_demoBallLifespan);

            DeathFeedback?.PlayFeedbacks();
            this.gameObject.SetActive(false);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Waits for 2 seconds, then kills the ball object after having played the MMFeedbacks
        /// </summary>
        /// <returns></returns>
        protected virtual IEnumerator ProgrammedDeath()
        {
            yield return(MMCoroutine.WaitFor(LifeSpan));

            DeathFeedback?.PlayFeedbacks();
            this.gameObject.SetActive(false);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Waits for 2 seconds, then kills the ball object after having played the MMFeedbacks
        /// </summary>
        /// <returns></returns>
        protected virtual IEnumerator ProgrammedDeath()
        {
            yield return(_demoBallLifespan);

            DeathFeedback?.PlayFeedbacks();
            Destroy(this.gameObject);
        }
Exemplo n.º 4
0
        /// <summary>
        /// On Play we turn our light on and start an over time coroutine if needed
        /// </summary>
        /// <param name="position"></param>
        /// <param name="feedbacksIntensity"></param>
        protected override void CustomPlayFeedback(Vector3 position, float feedbacksIntensity = 1.0f)
        {
            if (!Active || !FeedbackTypeAuthorized)
            {
                return;
            }

            if (Mode == Modes.PlayFeedbacksInArea)
            {
                MMFeedbacksShakeEvent.Trigger(Channel, UseRange, EventRange, EventOriginTransform.position);
            }
            else if (Mode == Modes.PlayTargetFeedbacks)
            {
                TargetFeedbacks?.PlayFeedbacks(position, feedbacksIntensity);
            }
        }
 protected override void ShakeStarts()
 {
     _mmFeedbacks.PlayFeedbacks();
 }