|
| virtual IEnumerator | PlayFeedbacksAfterFrames (int framesAmount) |
| | A coroutine you can start to play this player's feedbacks after X frames.
|
| virtual void | PreInitialization () |
| override void | Initialization (bool forceInitIfPlaying=false) |
| | A public method to initialize the feedback, specifying an owner that will be used as the reference for position and hierarchy by feedbacks.
|
| override void | Initialization (GameObject owner) |
| | When calling the legacy init method that used to specify an owner, we force the MMF Player init to run.
|
| override void | PlayFeedbacks () |
| | Plays all feedbacks using the MMFeedbacks' position as reference, and no attenuation.
|
| override void | PlayFeedbacks (Vector3 position, float feedbacksIntensity=1.0f, bool forceChangeDirection=false) |
| | Plays all feedbacks, specifying a position and intensity. The position may be used by each Feedback and taken into account to spark a particle or play a sound for example. The feedbacks intensity is a factor that can be used by each Feedback to lower its intensity, usually you'll want to define that attenuation based on time or distance (using a lower intensity value for feedbacks happening further away from the Player). Additionally you can force the feedback to play in reverse, ignoring its current condition You can also pass your MMF Player a context, which is a dictionary of anything you'd like, to use in your custom feedbacks.
|
| virtual void | PlayFeedbacks (Vector3 position, float feedbacksIntensity=1.0f, bool forceChangeDirection=false, Dictionary< string, object > context=null) |
| | You can use this method signature to pass a context to your feedbacks. This context will be accessible from any feedback via Owner.Context From there, you can do stuff like: MyPlayer.PlayFeedbacks(this.transform.position, 1f, false, new Dictionary<string, object> { { "Something", "SomeValue" } }); and then, in your custom feedback: var myValue = Owner.Context["Something"];.
|
| override void | PlayFeedbacksInReverse () |
| | Plays all feedbacks using the MMFeedbacks' position as reference, and no attenuation, and in reverse (from bottom to top)
|
| override void | PlayFeedbacksInReverse (Vector3 position, float feedbacksIntensity=1.0f, bool forceChangeDirection=false) |
| | Plays all feedbacks using the MMFeedbacks' position as reference, and no attenuation, and in reverse (from bottom to top)
|
| override void | PlayFeedbacksOnlyIfReversed () |
| | Plays all feedbacks in the sequence, but only if this MMFeedbacks is playing in reverse order.
|
| override void | PlayFeedbacksOnlyIfReversed (Vector3 position, float feedbacksIntensity=1.0f, bool forceChangeDirection=false) |
| | Plays all feedbacks in the sequence, but only if this MMFeedbacks is playing in reverse order.
|
| override void | PlayFeedbacksOnlyIfNormalDirection () |
| | Plays all feedbacks in the sequence, but only if this MMFeedbacks is playing in normal order.
|
| override void | PlayFeedbacksOnlyIfNormalDirection (Vector3 position, float feedbacksIntensity=1.0f, bool forceChangeDirection=false) |
| | Plays all feedbacks in the sequence, but only if this MMFeedbacks is playing in normal order.
|
| override IEnumerator | PlayFeedbacksCoroutine (Vector3 position, float feedbacksIntensity=1.0f, bool forceChangeDirection=false) |
| | A public coroutine you can call externally when you want to yield in a coroutine of yours until the MMFeedbacks has stopped playing typically : yield return myFeedback.PlayFeedbacksCoroutine(this.transform.position, 1.0f, false);.
|
| virtual void | PlayFeedbacksTopToBottom () |
| | Plays all feedbacks in the sequence from top to bottom.
|
| virtual void | PlayFeedbacksBottomToTop () |
| | Plays all feedbacks in the sequence from bottom to top.
|
| virtual bool | IsAllowedToPlay (Vector3 position) |
| | Returns true if this feedback is allowed to play, false otherwise.
|
| override void | StopFeedbacks () |
| | Stops all further feedbacks from playing, as well as stopping individual feedbacks.
|
| override void | StopFeedbacks (bool stopAllFeedbacks=true) |
| | Stops all feedbacks from playing, with an option to also stop individual feedbacks.
|
| override void | StopFeedbacks (Vector3 position, float feedbacksIntensity=1.0f, bool stopAllFeedbacks=true) |
| | Stops all feedbacks from playing, specifying a position and intensity that can be used by the Feedbacks.
|
| override void | ResetFeedbacks () |
| | Calls each feedback's Reset method if they've defined one. An example of that can be resetting the initial color of a flickering renderer. It's usually called automatically before playing them.
|
| override void | ChangeDirection () |
| | Changes the direction of this MMFeedbacks.
|
| virtual void | SetDirection (Directions newDirection) |
| | Sets the direction of the player to the one specified in parameters.
|
| void | SetDirectionTopToBottom () |
| | Sets the direction to top to bottom.
|
| void | SetDirectionBottomToTop () |
| | Sets the direction to bottom to top.
|
| virtual void | PlayerCompleteFeedbacks () |
| | When the player is done playing, we call PlayerComplete on all its feedbacks to let them know the player is done.
|
| override void | PauseFeedbacks () |
| | Pauses execution of a sequence, which can then be resumed by calling ResumeFeedbacks()
|
| virtual void | RestoreInitialValues () |
| | Restores the initial state of this player, resetting its feedbacks target values to their initial values.
|
| virtual void | ForceInitialValues () |
| | Forces initial vales on all feedbacks that support it. For example, a position feedback that'd move a Transform from A to B would move that transform to A.
|
| virtual void | SkipToTheEnd () |
| | Skips to the end of a sequence of feedbacks. Note that depending on your setup, this can take up to 3 frames to complete, don't disable your player instantly, or it won't complete the skipping.
|
| override void | ResumeFeedbacks () |
| | Resumes execution of a sequence if a script driven pause is in progress.
|
| virtual void | ResetAllCooldowns () |
| | Resets the cooldowns on this MMF Player, for the MMF Player itself and for all its feedbacks.
|
| virtual void | ResetCooldown () |
| | Resets the cooldown on this MMF Player, letting you play it again instantly, regardless of its cooldown settings and how much time has passed since its last play.
|
| virtual void | ResetFeedbacksCooldowns () |
| | Resets cooldowns on all feedbacks, letting you play them again instantly, regardless of their cooldown settings and how much time has passed since their last play.
|
| virtual void | AddFeedback (MMF_Feedback newFeedback, bool copy=false) |
| | Adds the specified MMF_Feedback to the player.
|
| new MMF_Feedback | AddFeedback (System.Type feedbackType, bool add=true) |
| | Adds a feedback of the specified type to the player.
|
| override void | RemoveFeedback (int id) |
| | Removes the feedback at the specified index.
|
| virtual void | CopyPlayerFrom (MMF_Player source) |
| | Replaces the current feedback list and player settings with the ones on the target MMF Player.
|
| virtual void | CopyFeedbackListFrom (MMF_Player source) |
| | Replaces the current feedback list with the feedbacks on the target MMF Player.
|
| virtual void | AddFeedbackListFrom (MMF_Player source) |
| | Adds the feedbacks on the target MMF Player to the current feedback list.
|
| virtual void | AutomaticShakerSetup () |
| | Calls the AutomaticShakerSetup method on all feedbacks that have it.
|
| override bool | HasFeedbackStillPlaying () |
| | Returns true if feedbacks are still playing.
|
| virtual float | ComputeRangeIntensityMultiplier (Vector3 position) |
| | Determines the intensity multiplier to apply.
|
| override float | ApplyTimeMultiplier (float duration) |
| | Applies this feedback's time multiplier to a duration (in seconds)
|
| virtual void | ProxyDestroy (GameObject gameObjectToDestroy) |
| | Lets you destroy objects from feedbacks.
|
| virtual void | ProxyDestroy (GameObject gameObjectToDestroy, float delay) |
| | Lets you destroy objects after a delay from feedbacks.
|
| virtual void | ProxyDestroyImmediate (GameObject gameObjectToDestroy) |
| | Lets you DestroyImmediate objects from feedbacks.
|
| virtual T | GetFeedbackOfType< T > (AccessMethods method, int referenceIndex) |
| | Returns the first feedback found in this player's list based on the chosen method and type First : first feedback of the matching type in the list, from top to bottom Previous : first feedback of the matching type located before (so above) the feedback at the reference index Closest : first feedback of the matching type located before or after the feedback at the reference index Next : first feedback of the matching type located after (so below) the feedback at the reference index First : last feedback of the matching type in the list, from top to bottom.
|
| virtual T | GetFeedbackOfType< T > () |
| | Returns the first feedback of the searched type on this MMF_Player.
|
| virtual List< T > | GetFeedbacksOfType< T > () |
| | Returns a list of all the feedbacks of the searched type on this MMF_Player.
|
| virtual T | GetFeedbackOfType< T > (string searchedLabel) |
| | Returns the first feedback of the searched type on this MMF_Player.
|
| virtual List< T > | GetFeedbacksOfType< T > (string searchedLabel) |
| | Returns a list of all the feedbacks of the searched type on this MMF_Player.
|
| void | OnMMEvent (MMF_PlayerEvent mmfPlayerEvent) |
| | Catches MMF_PlayerEvents and plays this MMF Player if the channel matches.
|
| virtual void | RefreshCache () |
| | Refreshes cached feedbacks.
|
| virtual void | ComputeCachedTotalDuration () |
| | Computes the total duration of the player's sequence of feedbacks.
|
| virtual float | GetTime () |
| virtual float | GetDeltaTime () |
| virtual async System.Threading.Tasks.Task | PlayFeedbacksTask (Vector3 position, float feedbacksIntensity=1.0f, bool forceChangeDirection=false) |
| | Plays all feedbacks and awaits until completion.
|
| virtual async System.Threading.Tasks.Task | PlayFeedbacksTask () |
| | Plays all feedbacks and awaits until completion.
|
| virtual void | SetCanPlay (bool newState) |
| | Use this method to authorize or prevent this player from being played.
|
| virtual void | AutoRepair () |
| | Unity sometimes has serialization issues. This method fixes that by fixing any bad sync that could happen.
|
| void | OnMMEvent (T eventType) |
|
| List< MMF_Feedback > | FeedbacksList |
| PlayModes | PlayMode = PlayModes.Parallel |
| | the mode in which feedbacks should play (parallel or sequential)
|
| float | SequentialDelay = 0f |
| | the delay (in seconds) to wait after each feedback completes before playing the next one, only used in Sequential mode
|
| bool | KeepPlayModeChanges = false |
| | whether or not to keep changes made in play mode after exiting it
|
| bool | PerformanceMode = false |
| | if this is true, the inspector won't refresh while the feedback plays, this saves on performance but feedback inspectors' progress bars for example won't look as smooth
|
| bool | RestoreInitialValuesOnDisable = false |
| | if this is true, RestoreInitialValues will be called on all feedbacks on Disable
|
| bool | StopFeedbacksOnDisable = false |
| | if this is true, StopFeedbacks will be called on all feedbacks on Disable
|
| int | PlayCount = 0 |
| | how many times this player has started playing
|
| bool | InPreviewMode = false |
| | whether this player is currently being previewed outside of playmode
|
| MMChannelModes | MMF_ChannelMode = MMChannelModes.Int |
| int | MMF_Channel = 0 |
| | the channel to listen to - has to match the one on the feedback/event you use to trigger it
|
| MMChannel | MMF_ChannelDefinition = null |
| List< MMFeedback > | Feedbacks = new List<MMFeedback>() |
| | a list of MMFeedback to trigger
|
| InitializationModes | InitializationMode = InitializationModes.Start |
| | the chosen initialization mode
|
| bool | AutoInitialization = true |
| | if you set this to true, the system will make changes to ensure that initialization always happens before play
|
| SafeModes | SafeMode = SafeModes.Full |
| | the selected safe mode
|
| Directions | Direction = Directions.TopToBottom |
| | the selected direction
|
| bool | AutoChangeDirectionOnEnd = false |
| | whether or not this MMFeedbacks should invert its direction when all feedbacks have played
|
| bool | AutoPlayOnStart = false |
| | whether or not to play this feedbacks automatically on Start
|
| bool | AutoPlayOnEnable = false |
| | whether or not to play this feedbacks automatically on Enable
|
| bool | LogMissingTargets = true |
| | whether or not to log console messages if feedback targets on this MMF Player are missing
|
| bool | ForceTimescaleMode = false |
| | if this is true, all feedbacks within that player will work on the specified ForcedTimescaleMode, regardless of their individual settings
|
| TimescaleModes | ForcedTimescaleMode = TimescaleModes.Unscaled |
| | the time scale mode all feedbacks on this player should work on, if ForceTimescaleMode is true
|
| float | DurationMultiplier = 1f |
| | a time multiplier that will be applied to all feedback durations (initial delay, duration, delay between repeats...)
|
| float | TimescaleMultiplier = 1f |
| | a multiplier to apply to all timescale operations (1: normal, less than 1: slower operations, higher than 1: faster operations)
|
| bool | RandomizeDuration = false |
| | if this is true, will expose a RandomDurationMultiplier. The final duration of each feedback will be : their base duration * DurationMultiplier * a random value between RandomDurationMultiplier.x and RandomDurationMultiplier.y
|
| Vector2 | RandomDurationMultiplier = new Vector2(0.5f, 1.5f) |
| | if RandomizeDuration is true, the min (x) and max (y) values for the random duration multiplier
|
| bool | DisplayFullDurationDetails = false |
| | if this is true, more editor-only, detailed info will be displayed per feedback in the duration slot
|
| TimescaleModes | PlayerTimescaleMode = TimescaleModes.Scaled |
| | the timescale at which the player itself will operate. This notably impacts sequencing and pauses duration evaluation.
|
| bool | OnlyPlayIfWithinRange = false |
| | if this is true, this feedback will only play if its distance to RangeCenter is lower or equal to RangeDistance
|
| Transform | RangeCenter |
| | when in OnlyPlayIfWithinRange mode, the transform to consider as the center of the range
|
| float | RangeDistance = 5f |
| | when in OnlyPlayIfWithinRange mode, the distance to the center within which the feedback will play
|
| bool | UseRangeFalloff = false |
| | when in OnlyPlayIfWithinRange mode, whether or not to modify the intensity of feedbacks based on the RangeFallOff curve
|
| AnimationCurve | RangeFalloff = new AnimationCurve(new Keyframe(0f, 1f), new Keyframe(1f, 0f)) |
| | the animation curve to use to define falloff (on the x 0 represents the range center, 1 represents the max distance to it)
|
| Vector2 | RemapRangeFalloff = new Vector2(0f, 1f) |
| | the values to remap the falloff curve's y axis' 0 and 1
|
| bool | IgnoreRangeEvents = false |
| | whether or not to ignore MMSetFeedbackRangeCenterEvent, used to set the RangeCenter from anywhere
|
| float | CooldownDuration = 0f |
| | a duration, in seconds, during which triggering a new play of this MMFeedbacks after it's been played once will be impossible
|
| float | InitialDelay = 0f |
| | a duration, in seconds, to delay the start of this MMFeedbacks' contents play
|
| bool | CanPlay = true |
| | whether this player can be played or not, useful to temporarily prevent play from another class, for example
|
| bool | CanPlayWhileAlreadyPlaying = true |
| | if this is true, you'll be able to trigger a new Play while this feedback is already playing, otherwise you won't be able to
|
| float | ChanceToPlay = 100f |
| | the chance of this sequence happening (in percent : 100 : happens all the time, 0 : never happens, 50 : happens once every two calls, etc)
|
| float | FeedbacksIntensity = 1f |
| MMFeedbacksEvents | Events |
| | a number of UnityEvents that can be triggered at the various stages of this MMFeedbacks
|
| bool | DebugActive = false |
| | whether or not this MMFeedbacks is in debug mode
|
| bool | InScriptDrivenPause |
| | whether or not the execution of this MMFeedbacks' sequence is being prevented and waiting for a Resume() call
|
|
| override void | Awake () |
| | On Awake we initialize our feedbacks if we're in auto mode.
|
| override void | Start () |
| | On Start we initialize our feedbacks if we're in auto mode.
|
| virtual void | InitializeFeedbackList () |
| | We initialize our list of feedbacks.
|
| virtual void | ExtraInitializationChecks () |
| | Performs extra checks, mostly to cover cases of dynamic creation.
|
| override void | OnEnable () |
| | On Enable we initialize our feedbacks if we're in auto mode.
|
| override void | PlayFeedbacksInternal (Vector3 position, float feedbacksIntensity, bool forceChangeDirection=false) |
| | An internal method used to play feedbacks, shouldn't be called externally.
|
| virtual IEnumerator | FrameOnePlayCo (Vector3 position, float feedbacksIntensity, bool forceChangeDirection=false) |
| override void | PreparePlay (Vector3 position, float feedbacksIntensity, bool forceChangeDirection=false) |
| override void | CheckForPauses () |
| override void | PlayAllFeedbacks (Vector3 position, float feedbacksIntensity, bool forceChangeDirection=false) |
| override IEnumerator | HandleInitialDelayCo (Vector3 position, float feedbacksIntensity, bool forceChangeDirection=false) |
| virtual IEnumerator | WaitForPlayerDelay (float delay) |
| | Waits for the specified delay using GetPlayerDeltaTime.
|
| virtual float | GetPlayerDeltaTime () |
| | Returns the player delta time, capped in editor preview mode to prevent spikes.
|
| override void | Update () |
| override IEnumerator | PausedFeedbacksCo (Vector3 position, float feedbacksIntensity) |
| | A coroutine used to handle the sequence of feedbacks if pauses are involved.
|
| virtual IEnumerator | SkipToTheEndCo () |
| override void | CheckForLoops () |
| | Checks whether or not this MMFeedbacks contains one or more looper feedbacks.
|
| virtual void | ComputeNewRandomDurationMultipliers () |
| | Computes new random duration multipliers on all feedbacks if needed.
|
| bool | FeedbackCanPlay (MMF_Feedback feedback) |
| | This will return true if the conditions defined in the specified feedback's Timing section allow it to play in the current play direction of this MMFeedbacks.
|
| override void | ApplyAutoChangeDirection () |
| | Readies the MMFeedbacks to change direction on the next play.
|
| virtual void | OnMMSetFeedbackRangeCenterEvent (Transform newTransform) |
| | When we get a MMSetFeedbackRangeCenterEvent, we set our new range center.
|
| override void | OnDisable () |
| | On Disable we stop all feedbacks.
|
| override void | OnValidate () |
| | On validate, we make sure our DurationMultiplier remains positive.
|
| override void | OnDestroy () |
| | On Destroy, removes all feedbacks from this MMFeedbacks to avoid any leftovers.
|
| void | OnDrawGizmosSelected () |
| | Draws gizmos, when the MMF_Player is selected, for all feedbacks that implement the method of the same name.
|
| virtual bool | EvaluateChance () |
| | Evaluates the chance of this feedback to play, and returns true if this feedback can play, false otherwise.
|
| bool | FeedbackCanPlay (MMFeedback feedback) |
| | This will return true if the conditions defined in the specified feedback's Timing section allow it to play in the current play direction of this MMFeedbacks.
|