Infinite Runner Engine v1.9
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MoreMountains.Feedbacks.MMFeedbacksEditor Class Reference

A custom editor displaying a foldable list of MMFeedbacks, a dropdown to add more, as well as test buttons to test your feedbacks at runtime More...

Inheritance diagram for MoreMountains.Feedbacks.MMFeedbacksEditor:

Classes

class  FeedbackTypePair
 A data structure to store types and names More...
 

Public Member Functions

override void OnInspectorGUI ()
 Draws the inspector, complete with helpbox, init mode selection, list of feedbacks, feedback selection and test buttons More...
 
override bool RequiresConstantRepaint ()
 We need to repaint constantly if dragging a feedback around More...
 
virtual void ConvertToMMF_Player (bool generateOnly)
 Converts a MMFeedbacks and all its contents into the new and improved MMF_Player To convert from MMFeedbacks to MMF_Player you have a few options : More...
 

Protected Member Functions

virtual void RepairRoutine ()
 Calls the repair routine if needed More...
 
virtual MMFeedback AddFeedback (System.Type type)
 Add a feedback to the list More...
 
virtual void RemoveFeedback (int id)
 Remove the selected feedback More...
 
virtual void AddEditor (MMFeedback feedback)
 Create the editor for a feedback More...
 
virtual void RemoveEditor (MMFeedback feedback)
 Destroy the editor for a feedback More...
 
virtual void InitializeFeedback (int id)
 Play the selected feedback More...
 
virtual void PlayFeedback (int id)
 Play the selected feedback More...
 
virtual void StopFeedback (int id)
 Play the selected feedback More...
 
virtual void ResetFeedback (int id)
 Resets the selected feedback More...
 
virtual void CopyFeedback (int id)
 Copy the selected feedback More...
 
virtual void CopyAll ()
 Asks for a full copy of the source More...
 
virtual void PasteFeedback (int id)
 Paste the previously copied feedback values into the selected feedback More...
 
virtual void PasteAsNew ()
 Creates a new feedback and applies the previoulsy copied feedback values More...
 
virtual void PasteAllAsNew ()
 Asks for a paste of all feedbacks in the source More...
 
virtual void CopyFromMMFeedbacksToMMF_Player (MMF_Player newPlayer)
 

Protected Attributes

MMFeedbacks _targetMMFeedbacks
 
SerializedProperty _mmfeedbacks
 
SerializedProperty _mmfeedbacksInitializationMode
 
SerializedProperty _mmfeedbacksSafeMode
 
SerializedProperty _mmfeedbacksAutoPlayOnStart
 
SerializedProperty _mmfeedbacksAutoPlayOnEnable
 
SerializedProperty _mmfeedbacksDirection
 
SerializedProperty _mmfeedbacksFeedbacksIntensity
 
SerializedProperty _mmfeedbacksAutoChangeDirectionOnEnd
 
SerializedProperty _mmfeedbacksDurationMultiplier
 
SerializedProperty _mmfeedbacksDisplayFullDurationDetails
 
SerializedProperty _mmfeedbacksCooldownDuration
 
SerializedProperty _mmfeedbacksInitialDelay
 
SerializedProperty _mmfeedbacksCanPlayWhileAlreadyPlaying
 
SerializedProperty _mmfeedbacksEvents
 
SerializedProperty _mmfeedbacksChanceToPlay
 
bool _canDisplayInspector = true
 
Dictionary< MMFeedback, Editor > _editors
 
List< FeedbackTypePair_typesAndNames = new List<FeedbackTypePair>()
 
string[] _typeDisplays
 
int _draggedStartID = -1
 
int _draggedEndID = -1
 
Color _originalBackgroundColor
 
Color _scriptDrivenBoxColor
 
Texture2D _scriptDrivenBoxBackgroundTexture
 
Color _scriptDrivenBoxColorFrom = new Color(1f,0f,0f,1f)
 
Color _scriptDrivenBoxColorTo = new Color(0.7f,0.1f,0.1f,1f)
 
Color _playButtonColor = new Color32(193, 255, 2, 255)
 
GUIStyle _directionButtonStyle
 
GUIStyle _playingStyle
 

Detailed Description

A custom editor displaying a foldable list of MMFeedbacks, a dropdown to add more, as well as test buttons to test your feedbacks at runtime

Member Function Documentation

◆ AddEditor()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.AddEditor ( MMFeedback  feedback)
protectedvirtual

Create the editor for a feedback

◆ AddFeedback()

virtual MMFeedback MoreMountains.Feedbacks.MMFeedbacksEditor.AddFeedback ( System.Type  type)
protectedvirtual

Add a feedback to the list

◆ ConvertToMMF_Player()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.ConvertToMMF_Player ( bool  generateOnly)
virtual

Converts a MMFeedbacks and all its contents into the new and improved MMF_Player To convert from MMFeedbacks to MMF_Player you have a few options :

  • on a MMFeedbacks Settings panel, press the Generate MMF_Player button, this will create a new MMF_Player component on the same object, and copy feedbacks to it, ready to use. The old MMFeedbacks won't be touched.
  • press the Convert feedback, and this will try to replace the current MMFeedbacks with a new MMF_Player with the same settings.
  • if you're inside a prefab instance, regular replace won't work, and you'll want to add, at the prefab level, an empty MMF_Player that will be the recipient of the conversion

◆ CopyAll()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.CopyAll ( )
protectedvirtual

Asks for a full copy of the source

◆ CopyFeedback()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.CopyFeedback ( int  id)
protectedvirtual

Copy the selected feedback

◆ CopyFromMMFeedbacksToMMF_Player()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.CopyFromMMFeedbacksToMMF_Player ( MMF_Player  newPlayer)
protectedvirtual

◆ InitializeFeedback()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.InitializeFeedback ( int  id)
protectedvirtual

Play the selected feedback

◆ OnInspectorGUI()

override void MoreMountains.Feedbacks.MMFeedbacksEditor.OnInspectorGUI ( )

Draws the inspector, complete with helpbox, init mode selection, list of feedbacks, feedback selection and test buttons

◆ PasteAllAsNew()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.PasteAllAsNew ( )
protectedvirtual

Asks for a paste of all feedbacks in the source

◆ PasteAsNew()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.PasteAsNew ( )
protectedvirtual

Creates a new feedback and applies the previoulsy copied feedback values

◆ PasteFeedback()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.PasteFeedback ( int  id)
protectedvirtual

Paste the previously copied feedback values into the selected feedback

◆ PlayFeedback()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.PlayFeedback ( int  id)
protectedvirtual

Play the selected feedback

◆ RemoveEditor()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.RemoveEditor ( MMFeedback  feedback)
protectedvirtual

Destroy the editor for a feedback

◆ RemoveFeedback()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.RemoveFeedback ( int  id)
protectedvirtual

Remove the selected feedback

◆ RepairRoutine()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.RepairRoutine ( )
protectedvirtual

Calls the repair routine if needed

◆ RequiresConstantRepaint()

override bool MoreMountains.Feedbacks.MMFeedbacksEditor.RequiresConstantRepaint ( )

We need to repaint constantly if dragging a feedback around

◆ ResetFeedback()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.ResetFeedback ( int  id)
protectedvirtual

Resets the selected feedback

Parameters
id

◆ StopFeedback()

virtual void MoreMountains.Feedbacks.MMFeedbacksEditor.StopFeedback ( int  id)
protectedvirtual

Play the selected feedback

Member Data Documentation

◆ _canDisplayInspector

bool MoreMountains.Feedbacks.MMFeedbacksEditor._canDisplayInspector = true
protected

◆ _directionButtonStyle

GUIStyle MoreMountains.Feedbacks.MMFeedbacksEditor._directionButtonStyle
protected

◆ _draggedEndID

int MoreMountains.Feedbacks.MMFeedbacksEditor._draggedEndID = -1
protected

◆ _draggedStartID

int MoreMountains.Feedbacks.MMFeedbacksEditor._draggedStartID = -1
protected

◆ _editors

Dictionary<MMFeedback, Editor> MoreMountains.Feedbacks.MMFeedbacksEditor._editors
protected

◆ _mmfeedbacks

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacks
protected

◆ _mmfeedbacksAutoChangeDirectionOnEnd

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksAutoChangeDirectionOnEnd
protected

◆ _mmfeedbacksAutoPlayOnEnable

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksAutoPlayOnEnable
protected

◆ _mmfeedbacksAutoPlayOnStart

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksAutoPlayOnStart
protected

◆ _mmfeedbacksCanPlayWhileAlreadyPlaying

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksCanPlayWhileAlreadyPlaying
protected

◆ _mmfeedbacksChanceToPlay

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksChanceToPlay
protected

◆ _mmfeedbacksCooldownDuration

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksCooldownDuration
protected

◆ _mmfeedbacksDirection

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksDirection
protected

◆ _mmfeedbacksDisplayFullDurationDetails

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksDisplayFullDurationDetails
protected

◆ _mmfeedbacksDurationMultiplier

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksDurationMultiplier
protected

◆ _mmfeedbacksEvents

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksEvents
protected

◆ _mmfeedbacksFeedbacksIntensity

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksFeedbacksIntensity
protected

◆ _mmfeedbacksInitialDelay

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksInitialDelay
protected

◆ _mmfeedbacksInitializationMode

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksInitializationMode
protected

◆ _mmfeedbacksSafeMode

SerializedProperty MoreMountains.Feedbacks.MMFeedbacksEditor._mmfeedbacksSafeMode
protected

◆ _originalBackgroundColor

Color MoreMountains.Feedbacks.MMFeedbacksEditor._originalBackgroundColor
protected

◆ _playButtonColor

Color MoreMountains.Feedbacks.MMFeedbacksEditor._playButtonColor = new Color32(193, 255, 2, 255)
protected

◆ _playingStyle

GUIStyle MoreMountains.Feedbacks.MMFeedbacksEditor._playingStyle
protected

◆ _scriptDrivenBoxBackgroundTexture

Texture2D MoreMountains.Feedbacks.MMFeedbacksEditor._scriptDrivenBoxBackgroundTexture
protected

◆ _scriptDrivenBoxColor

Color MoreMountains.Feedbacks.MMFeedbacksEditor._scriptDrivenBoxColor
protected

◆ _scriptDrivenBoxColorFrom

Color MoreMountains.Feedbacks.MMFeedbacksEditor._scriptDrivenBoxColorFrom = new Color(1f,0f,0f,1f)
protected

◆ _scriptDrivenBoxColorTo

Color MoreMountains.Feedbacks.MMFeedbacksEditor._scriptDrivenBoxColorTo = new Color(0.7f,0.1f,0.1f,1f)
protected

◆ _targetMMFeedbacks

MMFeedbacks MoreMountains.Feedbacks.MMFeedbacksEditor._targetMMFeedbacks
protected

◆ _typeDisplays

string [] MoreMountains.Feedbacks.MMFeedbacksEditor._typeDisplays
protected

◆ _typesAndNames

List<FeedbackTypePair> MoreMountains.Feedbacks.MMFeedbacksEditor._typesAndNames = new List<FeedbackTypePair>()
protected

The documentation for this class was generated from the following file: