Jumpvalley 0.5.0
An app and library that can be used to test and run 3D platformer levels. Currently being made with Godot.
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Properties | List of all members
Jumpvalley.Tweening.SceneTreeTween Class Reference

MethodTween that can bind to the Process step of a Godot scene tree.
Every process step, the tween will also get stepped until the playback of the tween is finished or stopped. More...

Inheritance diagram for Jumpvalley.Tweening.SceneTreeTween:
Jumpvalley.Tweening.MethodTween

Public Member Functions

 SceneTreeTween (double transitionTime, Tween.TransitionType transitionType, Tween.EaseType easeType, SceneTree sceneTree)
 Constructs a new instance of SceneTree.
 
- Public Member Functions inherited from Jumpvalley.Tweening.MethodTween
 MethodTween (double transitionTime, Tween.TransitionType transitionType, Tween.EaseType easeType)
 
double GetCurrentValue ()
 Returns the current value of the tween. This value is calculated by performing linear interpolation between InitialValue and EndingValue with the fraction between the value being CurrentFraction
 
bool IsFinished ()
 Returns if the tween is finished.
The tween is considered to be finished if one of the following is true:

  • ElapsedTime equals TransitionTime when Speed is greater than or equal to 0
  • ElapsedTime equals 0 when Speed is less than 0

 
virtual void Pause ()
 Pauses the tween.
 
virtual void Resume ()
 Starts or resumes the tween.
 
void Step (double delta)
 Moves the current tweening position by a custom step in seconds.
 
void Step ()
 Calls Step(double) where the "double" argument is the number of seconds that Step() (with no arguments) was called.
If this is the first time that Step() (with no arguments) was called since instantiation, the "double" argument will instead be the number of seconds since the tween started running.
 
virtual void Dispose ()
 

Protected Member Functions

void HandleProcessStep ()
 
- Protected Member Functions inherited from Jumpvalley.Tweening.MethodTween
void RaiseOnStep (float frac)
 
void RaiseOnResume ()
 
void RaiseOnPause ()
 
void RaiseOnFinish ()
 

Properties

SceneTree Tree [get, set]
 The scene tree associated with this tween.
 
override bool IsPlaying [get, protected set]
 
- Properties inherited from Jumpvalley.Tweening.MethodTween
virtual bool IsPlaying [get, protected set]
 Whether or not the tween is current playing/running.
 
float CurrentFraction [get]
 The current fraction of the tween that has been completed so far, typically in the range of [0, 1].
 
double ElapsedTime [get]
 The elapsed time that the tween has been running in seconds. This speed at which this value changes is affected by Speed
 

Additional Inherited Members

- Static Public Member Functions inherited from Jumpvalley.Tweening.MethodTween
static double Lerp (double initVal, double finalVal, double frac)
 Returns a linear interpolation between an initial value and a final value for a given fraction.
 
- Public Attributes inherited from Jumpvalley.Tweening.MethodTween
double TransitionTime
 The duration of the entire tween in seconds.
 
Tween.TransitionType TransitionType
 The transition type (parent function that will be doing the easing) as defined in Godot's Tween.TransitionType
 
Tween.EaseType EaseType
 The easing type
This controls how the tween speeds up and slows down over time. See Godot's documentation for Tween.EaseType for more details.
 
double InitialValue = 0
 The initial value of the tween.
 
double FinalValue = 0
 The final value of the tween.
 
float Speed = 1
 The speed of the tweening where 1 represents normal speed, 0 represents freezing, and -1 represents backwards at normal speed.
 
- Events inherited from Jumpvalley.Tweening.MethodTween
EventHandler< float > OnStep
 Event that gets raised on each step of the tween until the animation pauses or finishes.
The float argument of the event is the current fraction of the tween that has been completed so far, typically in the range of [0, 1].
Example usage:
 
EventHandler OnResume
 Event raised when the tween resumes playback.
 
EventHandler OnPause
 Event raised when the tween is paused during playback.
 
EventHandler OnFinish
 Event raised when the tween finishes playback.
This event only raises when IsFinished() would return true. See IsFinished() for more details.
 

Detailed Description

MethodTween that can bind to the Process step of a Godot scene tree.
Every process step, the tween will also get stepped until the playback of the tween is finished or stopped.

Constructor & Destructor Documentation

◆ SceneTreeTween()

Jumpvalley.Tweening.SceneTreeTween.SceneTreeTween ( double transitionTime,
Tween::TransitionType transitionType,
Tween::EaseType easeType,
SceneTree sceneTree )
inline

Constructs a new instance of SceneTree.

Parameters
transitionTimeSee the base constructors for description
transitionType
easeType
sceneTreeThe scene tree to associate the SceneTreeTween with. If the SceneTree to associate with isn't known or accessible yet, specify this parameter with null.

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