A collection of MMFeedback, meant to be played altogether. This class provides a custom inspector to add and customize feedbacks, and public methods to trigger them, stop them, etc. You can either use it on its own, or bind it from another class and trigger it from there.
More...
|
virtual void | Initialization () |
| Initializes the MMFeedbacks, setting this MMFeedbacks as the owner More...
|
|
virtual void | Initialization (GameObject owner) |
| A public method to initialize the feedback, specifying an owner that will be used as the reference for position and hierarchy by feedbacks More...
|
|
virtual void | PlayFeedbacks () |
| Plays all feedbacks using the MMFeedbacks' position as reference, and no attenuation More...
|
|
virtual void | PlayFeedbacks (Vector3 position, float attenuation=1.0f) |
| Plays all feedbacks, specifying a position and attenuation. The position may be used by each Feedback and taken into account to spark a particle or play a sound for example. The attenuation 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 attenuation value for feedbacks happening further away from the Player). More...
|
|
virtual void | StopFeedbacks () |
| Stops all feedbacks from playing. More...
|
|
virtual void | StopFeedbacks (Vector3 position, float attenuation=1.0f) |
| Stops all feedbacks from playing, specifying a position and attenuation that can be used by the Feedbacks More...
|
|
virtual 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. More...
|
|
virtual void | AutoRepair () |
| Unity sometimes has serialization issues. This method fixes that by fixing any bad sync that could happen. More...
|
|
|
virtual void | Awake () |
| On Awake we initialize our feedbacks if we're in auto mode More...
|
|
virtual void | Start () |
| On Start we initialize our feedbacks if we're in auto mode More...
|
|
virtual void | PlayFeedbacksInternal (Vector3 position, float attenuation) |
| An internal method used to play feedbacks, shouldn't be called externally More...
|
|
virtual IEnumerator | PausedFeedbacksCo (Vector3 position, float attenuation) |
| A coroutine used to pause feedbacks More...
|
|
virtual void | OnDisable () |
| On Disable we stop all feedbacks More...
|
|
virtual void | OnDestroy () |
| On Destroy, removes all feedbacks from this MMFeedbacks to avoid any leftovers More...
|
|
A collection of MMFeedback, meant to be played altogether. This class provides a custom inspector to add and customize feedbacks, and public methods to trigger them, stop them, etc. You can either use it on its own, or bind it from another class and trigger it from there.
◆ InitializationModes
the possible initialization modes. If you use Script, you'll have to initialize manually by calling the Initialization method and passing it an owner Otherwise, you can have this component initialize itself at Awake or Start, and in this case the owner will be the MMFeedbacks itself
Enumerator |
---|
Script | |
Awake | |
Start | |
◆ SafeModes
the possible SafeModes (will perform checks to make sure no serialization error has damaged them)
- nope : no safety
- editor only : performs checks on enable
- runtime only : performs checks on Awake
- full : performs both editor and runtime checks, recommended setting
Enumerator |
---|
Nope | |
EditorOnly | |
RuntimeOnly | |
Full | |
◆ AutoRepair()
virtual void MoreMountains.Feedbacks.MMFeedbacks.AutoRepair |
( |
| ) |
|
|
virtual |
Unity sometimes has serialization issues. This method fixes that by fixing any bad sync that could happen.
◆ Awake()
virtual void MoreMountains.Feedbacks.MMFeedbacks.Awake |
( |
| ) |
|
|
protectedvirtual |
On Awake we initialize our feedbacks if we're in auto mode
◆ Initialization() [1/2]
virtual void MoreMountains.Feedbacks.MMFeedbacks.Initialization |
( |
| ) |
|
|
virtual |
◆ Initialization() [2/2]
virtual void MoreMountains.Feedbacks.MMFeedbacks.Initialization |
( |
GameObject |
owner | ) |
|
|
virtual |
A public method to initialize the feedback, specifying an owner that will be used as the reference for position and hierarchy by feedbacks
- Parameters
-
◆ OnDestroy()
virtual void MoreMountains.Feedbacks.MMFeedbacks.OnDestroy |
( |
| ) |
|
|
protectedvirtual |
On Destroy, removes all feedbacks from this MMFeedbacks to avoid any leftovers
◆ OnDisable()
virtual void MoreMountains.Feedbacks.MMFeedbacks.OnDisable |
( |
| ) |
|
|
protectedvirtual |
On Disable we stop all feedbacks
◆ PausedFeedbacksCo()
virtual IEnumerator MoreMountains.Feedbacks.MMFeedbacks.PausedFeedbacksCo |
( |
Vector3 |
position, |
|
|
float |
attenuation |
|
) |
| |
|
protectedvirtual |
A coroutine used to pause feedbacks
- Parameters
-
- Returns
◆ PlayFeedbacks() [1/2]
virtual void MoreMountains.Feedbacks.MMFeedbacks.PlayFeedbacks |
( |
| ) |
|
|
virtual |
Plays all feedbacks using the MMFeedbacks' position as reference, and no attenuation
◆ PlayFeedbacks() [2/2]
virtual void MoreMountains.Feedbacks.MMFeedbacks.PlayFeedbacks |
( |
Vector3 |
position, |
|
|
float |
attenuation = 1.0f |
|
) |
| |
|
virtual |
Plays all feedbacks, specifying a position and attenuation. The position may be used by each Feedback and taken into account to spark a particle or play a sound for example. The attenuation 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 attenuation value for feedbacks happening further away from the Player).
- Parameters
-
position | |
feedbacksOwner | |
attenuation | |
◆ PlayFeedbacksInternal()
virtual void MoreMountains.Feedbacks.MMFeedbacks.PlayFeedbacksInternal |
( |
Vector3 |
position, |
|
|
float |
attenuation |
|
) |
| |
|
protectedvirtual |
An internal method used to play feedbacks, shouldn't be called externally
- Parameters
-
◆ ResetFeedbacks()
virtual void MoreMountains.Feedbacks.MMFeedbacks.ResetFeedbacks |
( |
| ) |
|
|
virtual |
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.
◆ Start()
virtual void MoreMountains.Feedbacks.MMFeedbacks.Start |
( |
| ) |
|
|
protectedvirtual |
On Start we initialize our feedbacks if we're in auto mode
◆ StopFeedbacks() [1/2]
virtual void MoreMountains.Feedbacks.MMFeedbacks.StopFeedbacks |
( |
| ) |
|
|
virtual |
Stops all feedbacks from playing.
◆ StopFeedbacks() [2/2]
virtual void MoreMountains.Feedbacks.MMFeedbacks.StopFeedbacks |
( |
Vector3 |
position, |
|
|
float |
attenuation = 1.0f |
|
) |
| |
|
virtual |
Stops all feedbacks from playing, specifying a position and attenuation that can be used by the Feedbacks
- Parameters
-
◆ _holdingMax
float MoreMountains.Feedbacks.MMFeedbacks._holdingMax = 0f |
|
protected |
◆ _lastStartAt
float MoreMountains.Feedbacks.MMFeedbacks._lastStartAt = 0f |
|
protected |
◆ _startTime
float MoreMountains.Feedbacks.MMFeedbacks._startTime = 0f |
|
protected |
◆ AutoPlayOnStart
bool MoreMountains.Feedbacks.MMFeedbacks.AutoPlayOnStart = false |
whether or not to play this feedbacks automatically on Start
◆ DebugActive
bool MoreMountains.Feedbacks.MMFeedbacks.DebugActive = false |
◆ Feedbacks
◆ GlobalMMFeedbacksActive
bool MoreMountains.Feedbacks.MMFeedbacks.GlobalMMFeedbacksActive = true |
|
static |
a global switch used to turn all feedbacks on or off globally
◆ InitializationMode
the chosen initialization mode
◆ SafeMode
◆ IsPlaying
bool MoreMountains.Feedbacks.MMFeedbacks.IsPlaying |
|
getprotected set |
whether or not this MMFeedbacks is playing right now - meaning it hasn't been stopped yet. if you don't stop your MMFeedbacks it'll remain true of course
The documentation for this class was generated from the following file:
- F:/Github/Store/MMFeedbacksStore/Assets/MMFeedbacks/MMFeedbacks/MMFeedbacks/Core/MMFeedbacks.cs