Feel  5.1
The best way to improve your game's feel and make it extra juicy
Lofelt.NiceVibrations.WobbleButton Class Reference
Inheritance diagram for Lofelt.NiceVibrations.WobbleButton:

Public Member Functions

virtual void SetPitch (float newPitch)
 
virtual void Initialization ()
 
virtual void SetNeutralPosition ()
 
virtual void OnPointerEnter (PointerEventData data)
 
virtual void OnPointerExit (PointerEventData data)
 

Public Attributes

Camera TargetCamera
 
AudioSource SpringAudioSource
 
Animator TargetAnimator
 
HapticSource SpringHapticSource
 
Image TargetModel
 
float OffDuration = 0.1f
 
float MaxRange
 
AnimationCurve WobbleCurve
 
float DragResetDuration = 4f
 
float WobbleFactor = 2f
 

Protected Member Functions

virtual void Start ()
 
virtual Vector3 GetWorldPosition (Vector3 testPosition)
 
virtual void Update ()
 
virtual void StickToPointer ()
 
virtual void GoBackToInitialPosition ()
 
virtual float Remap (float x, float A, float B, float C, float D)
 

Protected Attributes

Vector3 _neutralPosition
 
Canvas _canvas
 
Vector3 _newTargetPosition
 
Vector3 _eventPosition
 
Vector2 _workPosition
 
float _initialZPosition
 
bool _dragging
 
int _pointerID
 
PointerEventData _pointerEventData
 
RectTransform _rectTransform
 
Vector3 _dragEndedPosition
 
float _dragEndedAt
 
Vector3 _dragResetDirection
 
bool _pointerOn = false
 
bool _draggedOnce = false
 
int _sparkAnimationParameter
 
long[] _wobbleAndroidPattern = { 0, 40, 40, 80 }
 
int[] _wobbleAndroidAmplitude = { 0, 40, 0, 80 }
 

Properties

RenderMode ParentCanvasRenderMode [get, protected set]
 

Member Function Documentation

◆ GetWorldPosition()

virtual Vector3 Lofelt.NiceVibrations.WobbleButton.GetWorldPosition ( Vector3  testPosition)
protectedvirtual

◆ GoBackToInitialPosition()

virtual void Lofelt.NiceVibrations.WobbleButton.GoBackToInitialPosition ( )
protectedvirtual

◆ Initialization()

virtual void Lofelt.NiceVibrations.WobbleButton.Initialization ( )
virtual

◆ OnPointerEnter()

virtual void Lofelt.NiceVibrations.WobbleButton.OnPointerEnter ( PointerEventData  data)
virtual

◆ OnPointerExit()

virtual void Lofelt.NiceVibrations.WobbleButton.OnPointerExit ( PointerEventData  data)
virtual

◆ Remap()

virtual float Lofelt.NiceVibrations.WobbleButton.Remap ( float  x,
float  A,
float  B,
float  C,
float  D 
)
protectedvirtual

◆ SetNeutralPosition()

virtual void Lofelt.NiceVibrations.WobbleButton.SetNeutralPosition ( )
virtual

◆ SetPitch()

virtual void Lofelt.NiceVibrations.WobbleButton.SetPitch ( float  newPitch)
virtual

◆ Start()

virtual void Lofelt.NiceVibrations.WobbleButton.Start ( )
protectedvirtual

◆ StickToPointer()

virtual void Lofelt.NiceVibrations.WobbleButton.StickToPointer ( )
protectedvirtual

◆ Update()

virtual void Lofelt.NiceVibrations.WobbleButton.Update ( )
protectedvirtual

Member Data Documentation

◆ _canvas

Canvas Lofelt.NiceVibrations.WobbleButton._canvas
protected

◆ _dragEndedAt

float Lofelt.NiceVibrations.WobbleButton._dragEndedAt
protected

◆ _dragEndedPosition

Vector3 Lofelt.NiceVibrations.WobbleButton._dragEndedPosition
protected

◆ _draggedOnce

bool Lofelt.NiceVibrations.WobbleButton._draggedOnce = false
protected

◆ _dragging

bool Lofelt.NiceVibrations.WobbleButton._dragging
protected

◆ _dragResetDirection

Vector3 Lofelt.NiceVibrations.WobbleButton._dragResetDirection
protected

◆ _eventPosition

Vector3 Lofelt.NiceVibrations.WobbleButton._eventPosition
protected

◆ _initialZPosition

float Lofelt.NiceVibrations.WobbleButton._initialZPosition
protected

◆ _neutralPosition

Vector3 Lofelt.NiceVibrations.WobbleButton._neutralPosition
protected

◆ _newTargetPosition

Vector3 Lofelt.NiceVibrations.WobbleButton._newTargetPosition
protected

◆ _pointerEventData

PointerEventData Lofelt.NiceVibrations.WobbleButton._pointerEventData
protected

◆ _pointerID

int Lofelt.NiceVibrations.WobbleButton._pointerID
protected

◆ _pointerOn

bool Lofelt.NiceVibrations.WobbleButton._pointerOn = false
protected

◆ _rectTransform

RectTransform Lofelt.NiceVibrations.WobbleButton._rectTransform
protected

◆ _sparkAnimationParameter

int Lofelt.NiceVibrations.WobbleButton._sparkAnimationParameter
protected

◆ _wobbleAndroidAmplitude

int [] Lofelt.NiceVibrations.WobbleButton._wobbleAndroidAmplitude = { 0, 40, 0, 80 }
protected

◆ _wobbleAndroidPattern

long [] Lofelt.NiceVibrations.WobbleButton._wobbleAndroidPattern = { 0, 40, 40, 80 }
protected

◆ _workPosition

Vector2 Lofelt.NiceVibrations.WobbleButton._workPosition
protected

◆ DragResetDuration

float Lofelt.NiceVibrations.WobbleButton.DragResetDuration = 4f

◆ MaxRange

float Lofelt.NiceVibrations.WobbleButton.MaxRange

◆ OffDuration

float Lofelt.NiceVibrations.WobbleButton.OffDuration = 0.1f

◆ SpringAudioSource

AudioSource Lofelt.NiceVibrations.WobbleButton.SpringAudioSource

◆ SpringHapticSource

HapticSource Lofelt.NiceVibrations.WobbleButton.SpringHapticSource

◆ TargetAnimator

Animator Lofelt.NiceVibrations.WobbleButton.TargetAnimator

◆ TargetCamera

Camera Lofelt.NiceVibrations.WobbleButton.TargetCamera

◆ TargetModel

Image Lofelt.NiceVibrations.WobbleButton.TargetModel

◆ WobbleCurve

AnimationCurve Lofelt.NiceVibrations.WobbleButton.WobbleCurve

◆ WobbleFactor

float Lofelt.NiceVibrations.WobbleButton.WobbleFactor = 2f

Property Documentation

◆ ParentCanvasRenderMode

RenderMode Lofelt.NiceVibrations.WobbleButton.ParentCanvasRenderMode
getprotected set

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