Infinite Runner Engine v1.9
Public Types | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
MoreMountains.Feedbacks.MMF_Position Class Reference

this feedback will let you animate the position of More...

Inheritance diagram for MoreMountains.Feedbacks.MMF_Position:
MoreMountains.Feedbacks.MMF_Feedback

Public Types

enum  Spaces { World , Local , RectTransform }
 sets the inspector color for this feedback More...
 
enum  Modes { AtoB , AlongCurve , ToDestination }
 
enum  TimeScales { Scaled , Unscaled }
 

Public Attributes

GameObject AnimatePositionTarget
 the object this feedback will animate the position for More...
 
Modes Mode = Modes.AtoB
 the mode this animation should follow (either going from A to B, or moving along a curve) More...
 
Spaces Space = Spaces.World
 the space in which to move the position in More...
 
float AnimatePositionDuration = 0.2f
 the duration of the animation on play More...
 
AnimationCurve AnimatePositionCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1))
 the acceleration of the movement More...
 
float RemapCurveZero = 0f
 the value to remap the curve's 0 value to More...
 
float RemapCurveOne = 1f
 the value to remap the curve's 1 value to More...
 
bool AnimateX
 if this is true, the x position will be animated More...
 
AnimationCurve AnimatePositionCurveX = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(0.6f, -1f), new Keyframe(1, 0f))
 the acceleration of the movement More...
 
bool AnimateY
 if this is true, the y position will be animated More...
 
AnimationCurve AnimatePositionCurveY = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(0.6f, -1f), new Keyframe(1, 0f))
 the acceleration of the movement More...
 
bool AnimateZ
 if this is true, the z position will be animated More...
 
AnimationCurve AnimatePositionCurveZ = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(0.6f, -1f), new Keyframe(1, 0f))
 the acceleration of the movement More...
 
bool AllowAdditivePlays = false
 if this is true, calling that feedback will trigger it, even if it's in progress. If it's false, it'll prevent any new Play until the current one is over More...
 
bool RelativePosition = true
 if this is true, the initial position won't be added to init and destination More...
 
bool DeterminePositionsOnPlay = false
 if this is true, initial and destination positions will be recomputed on every play More...
 
Vector3 InitialPosition = Vector3.zero
 the initial position More...
 
Vector3 DestinationPosition = Vector3.one
 the destination position More...
 
Transform InitialPositionTransform
 the initial transform - if set, takes precedence over the Vector3 above More...
 
Transform DestinationPositionTransform
 the destination transform - if set, takes precedence over the Vector3 above More...
 

Static Public Attributes

static bool FeedbackTypeAuthorized = true
 a static bool used to disable all feedbacks of this type at once More...
 

Protected Member Functions

override void CustomInitialization (MMF_Player owner)
 On init, we set our initial and destination positions (transform will take precedence over vector3s) More...
 
virtual void DeterminePositions ()
 
override void CustomPlayFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On Play, we move our object from A to B More...
 
virtual IEnumerator MoveAlongCurve (GameObject movingObject, Vector3 initialPosition, float duration, float intensityMultiplier)
 Moves the object along a curve More...
 
virtual void ComputeNewCurvePosition (GameObject movingObject, Vector3 initialPosition, float percent, float intensityMultiplier)
 Evaluates the position curves and computes the new position More...
 
virtual IEnumerator MoveFromTo (GameObject movingObject, Vector3 pointA, Vector3 pointB, float duration, AnimationCurve curve=null)
 Moves an object from point A to point B in a given time More...
 
virtual Vector3 GetPosition (Transform target)
 Gets the world, local or anchored position More...
 
virtual void SetPosition (Transform target, Vector3 newPosition)
 Sets the position, localposition or anchoredposition of the target More...
 
override void CustomStopFeedback (Vector3 position, float feedbacksIntensity=1.0f)
 On stop, we interrupt movement if it was active More...
 
virtual void OnDisable ()
 On disable we reset our coroutine More...
 

Protected Attributes

Vector3 _newPosition
 
Vector3 _currentPosition
 
RectTransform _rectTransform
 
Vector3 _initialPosition
 
Vector3 _destinationPosition
 
Coroutine _coroutine
 
Vector3 _workInitialPosition
 

Properties

override float FeedbackDuration [getset]
 the duration of this feedback is the duration of its animation More...
 

Additional Inherited Members

Detailed Description

this feedback will let you animate the position of

Member Enumeration Documentation

◆ Modes

Enumerator
AtoB 
AlongCurve 
ToDestination 

◆ Spaces

sets the inspector color for this feedback

Enumerator
World 
Local 
RectTransform 

◆ TimeScales

Enumerator
Scaled 
Unscaled 

Member Function Documentation

◆ ComputeNewCurvePosition()

virtual void MoreMountains.Feedbacks.MMF_Position.ComputeNewCurvePosition ( GameObject  movingObject,
Vector3  initialPosition,
float  percent,
float  intensityMultiplier 
)
protectedvirtual

Evaluates the position curves and computes the new position

Parameters
movingObject
initialPosition
percent

◆ CustomInitialization()

override void MoreMountains.Feedbacks.MMF_Position.CustomInitialization ( MMF_Player  owner)
protectedvirtual

On init, we set our initial and destination positions (transform will take precedence over vector3s)

Parameters
owner

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomPlayFeedback()

override void MoreMountains.Feedbacks.MMF_Position.CustomPlayFeedback ( Vector3  position,
float  feedbacksIntensity = 1.0f 
)
protectedvirtual

On Play, we move our object from A to B

Parameters
position
feedbacksIntensity

Implements MoreMountains.Feedbacks.MMF_Feedback.

◆ CustomStopFeedback()

override void MoreMountains.Feedbacks.MMF_Position.CustomStopFeedback ( Vector3  position,
float  feedbacksIntensity = 1.0f 
)
protectedvirtual

On stop, we interrupt movement if it was active

Parameters
position
feedbacksIntensity

Reimplemented from MoreMountains.Feedbacks.MMF_Feedback.

◆ DeterminePositions()

virtual void MoreMountains.Feedbacks.MMF_Position.DeterminePositions ( )
protectedvirtual

◆ GetPosition()

virtual Vector3 MoreMountains.Feedbacks.MMF_Position.GetPosition ( Transform  target)
protectedvirtual

Gets the world, local or anchored position

Parameters
target
Returns

◆ MoveAlongCurve()

virtual IEnumerator MoreMountains.Feedbacks.MMF_Position.MoveAlongCurve ( GameObject  movingObject,
Vector3  initialPosition,
float  duration,
float  intensityMultiplier 
)
protectedvirtual

Moves the object along a curve

Parameters
movingObject
pointA
pointB
duration
curve
Returns

◆ MoveFromTo()

virtual IEnumerator MoreMountains.Feedbacks.MMF_Position.MoveFromTo ( GameObject  movingObject,
Vector3  pointA,
Vector3  pointB,
float  duration,
AnimationCurve  curve = null 
)
protectedvirtual

Moves an object from point A to point B in a given time

Parameters
movingObjectMoving object.
pointAPoint a.
pointBPoint b.
durationTime.

◆ OnDisable()

virtual void MoreMountains.Feedbacks.MMF_Position.OnDisable ( )
protectedvirtual

On disable we reset our coroutine

◆ SetPosition()

virtual void MoreMountains.Feedbacks.MMF_Position.SetPosition ( Transform  target,
Vector3  newPosition 
)
protectedvirtual

Sets the position, localposition or anchoredposition of the target

Parameters
target
newPosition

Member Data Documentation

◆ _coroutine

Coroutine MoreMountains.Feedbacks.MMF_Position._coroutine
protected

◆ _currentPosition

Vector3 MoreMountains.Feedbacks.MMF_Position._currentPosition
protected

◆ _destinationPosition

Vector3 MoreMountains.Feedbacks.MMF_Position._destinationPosition
protected

◆ _initialPosition

Vector3 MoreMountains.Feedbacks.MMF_Position._initialPosition
protected

◆ _newPosition

Vector3 MoreMountains.Feedbacks.MMF_Position._newPosition
protected

◆ _rectTransform

RectTransform MoreMountains.Feedbacks.MMF_Position._rectTransform
protected

◆ _workInitialPosition

Vector3 MoreMountains.Feedbacks.MMF_Position._workInitialPosition
protected

◆ AllowAdditivePlays

bool MoreMountains.Feedbacks.MMF_Position.AllowAdditivePlays = false

if this is true, calling that feedback will trigger it, even if it's in progress. If it's false, it'll prevent any new Play until the current one is over

◆ AnimatePositionCurve

AnimationCurve MoreMountains.Feedbacks.MMF_Position.AnimatePositionCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1))

the acceleration of the movement

◆ AnimatePositionCurveX

AnimationCurve MoreMountains.Feedbacks.MMF_Position.AnimatePositionCurveX = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(0.6f, -1f), new Keyframe(1, 0f))

the acceleration of the movement

◆ AnimatePositionCurveY

AnimationCurve MoreMountains.Feedbacks.MMF_Position.AnimatePositionCurveY = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(0.6f, -1f), new Keyframe(1, 0f))

the acceleration of the movement

◆ AnimatePositionCurveZ

AnimationCurve MoreMountains.Feedbacks.MMF_Position.AnimatePositionCurveZ = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.3f, 1f), new Keyframe(0.6f, -1f), new Keyframe(1, 0f))

the acceleration of the movement

◆ AnimatePositionDuration

float MoreMountains.Feedbacks.MMF_Position.AnimatePositionDuration = 0.2f

the duration of the animation on play

◆ AnimatePositionTarget

GameObject MoreMountains.Feedbacks.MMF_Position.AnimatePositionTarget

the object this feedback will animate the position for

◆ AnimateX

bool MoreMountains.Feedbacks.MMF_Position.AnimateX

if this is true, the x position will be animated

◆ AnimateY

bool MoreMountains.Feedbacks.MMF_Position.AnimateY

if this is true, the y position will be animated

◆ AnimateZ

bool MoreMountains.Feedbacks.MMF_Position.AnimateZ

if this is true, the z position will be animated

◆ DestinationPosition

Vector3 MoreMountains.Feedbacks.MMF_Position.DestinationPosition = Vector3.one

the destination position

◆ DestinationPositionTransform

Transform MoreMountains.Feedbacks.MMF_Position.DestinationPositionTransform

the destination transform - if set, takes precedence over the Vector3 above

◆ DeterminePositionsOnPlay

bool MoreMountains.Feedbacks.MMF_Position.DeterminePositionsOnPlay = false

if this is true, initial and destination positions will be recomputed on every play

◆ FeedbackTypeAuthorized

bool MoreMountains.Feedbacks.MMF_Position.FeedbackTypeAuthorized = true
static

a static bool used to disable all feedbacks of this type at once

◆ InitialPosition

Vector3 MoreMountains.Feedbacks.MMF_Position.InitialPosition = Vector3.zero

the initial position

◆ InitialPositionTransform

Transform MoreMountains.Feedbacks.MMF_Position.InitialPositionTransform

the initial transform - if set, takes precedence over the Vector3 above

◆ Mode

Modes MoreMountains.Feedbacks.MMF_Position.Mode = Modes.AtoB

the mode this animation should follow (either going from A to B, or moving along a curve)

◆ RelativePosition

bool MoreMountains.Feedbacks.MMF_Position.RelativePosition = true

if this is true, the initial position won't be added to init and destination

◆ RemapCurveOne

float MoreMountains.Feedbacks.MMF_Position.RemapCurveOne = 1f

the value to remap the curve's 1 value to

◆ RemapCurveZero

float MoreMountains.Feedbacks.MMF_Position.RemapCurveZero = 0f

the value to remap the curve's 0 value to

◆ Space

Spaces MoreMountains.Feedbacks.MMF_Position.Space = Spaces.World

the space in which to move the position in

Property Documentation

◆ FeedbackDuration

override float MoreMountains.Feedbacks.MMF_Position.FeedbackDuration
getset

the duration of this feedback is the duration of its animation


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