using MoreMountains.Feedbacks; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace MoreMountains.Feel { /// /// A simple class used in Feel's Bounce demo scene. /// It's meant to be piloted by an animator, that calls animator events at certain points of its "cube jumps" animation /// public class BounceFeedbacks : MonoBehaviour { /// a feedback to be played when the cube starts "charging" public MMFeedbacks ChargeFeedbacks; /// a feedback to be played when the jump happens public MMFeedbacks JumpFeedbacks; /// a feedback to be played when the cube lands public MMFeedbacks LandingFeedbacks; /// /// Called via an animator event when the charge starts /// public virtual void PlayCharge() { ChargeFeedbacks?.PlayFeedbacks(); } /// /// Called via an animator event when the cube jumps /// public virtual void PlayJump() { JumpFeedbacks?.PlayFeedbacks(); } /// /// Called via an animator event when the cube lands /// public virtual void PlayLanding() { LandingFeedbacks?.PlayFeedbacks(); } } }