Rebel Fork Framework
Urho3D::Actions::ActionState Class Reference
Inheritance diagram for Urho3D::Actions::ActionState:
Urho3D::RefCounted Urho3D::Actions::FiniteTimeActionState Urho3D::Actions::ActionInstantState Urho3D::Actions::AttributeActionState Urho3D::Actions::AttributeBlinkState Urho3D::Actions::SetAttributeState

Public Member Functions

virtual void Update (float time)
 
ObjectGetTarget () const
 
ObjectGetOriginalTarget () const
 Gets the original target.
 
BaseActionGetAction () const
 Gets the action.
 
virtual bool IsDone () const
 Gets a value indicating whether this instance is done.
 
virtual void Stop ()
 
- Public Member Functions inherited from Urho3D::RefCounted
 RefCounted ()
 Construct. Allocate the reference count structure and set an initial self weak reference.
 
virtual ~RefCounted ()
 Destruct. Mark as expired and also delete the reference count structure if no outside weak references exist.
 
 RefCounted (const RefCounted &rhs)=delete
 Prevent copy construction.
 
RefCountedoperator= (const RefCounted &rhs)=delete
 Prevent assignment.
 
int AddRef ()
 
int ReleaseRef ()
 
int Refs () const
 
int WeakRefs () const
 
RefCountRefCountPtr () const
 Return pointer to the reference count structure.
 
bool HasScriptObject () const
 Return true if script runtime object wrapping this native object exists.
 
bool IsScriptStrongRef () const
 Return true if script reference is strong.
 

Protected Member Functions

 ActionState (BaseAction *action, Object *target)
 
virtual void Step (float dt)
 
SharedPtr< ActionStateStartAction (BaseAction *action, Object *target) const
 Call StartAction on an action.
 

Private Attributes

SharedPtr< BaseAction_action
 
WeakPtr< Object_target
 Active target reference. Set to nullptr when action is complete.
 
WeakPtr< Object_originalTarget
 Original target reference. To track target references in ActionManager.
 

Friends

class Urho3D::ActionManager
 

Member Function Documentation

◆ GetTarget()

Object* Urho3D::Actions::ActionState::GetTarget ( ) const
inline

Gets the target. Will be set with the 'StartAction' method of the corresponding Action. When the 'Stop' method is called, Target will be set to null.

◆ Step()

void Urho3D::Actions::ActionState::Step ( float  dt)
protectedvirtual

Called every frame with it's delta time. DON'T override unless you know what you are doing.

Reimplemented in Urho3D::Actions::ActionInstantState, and Urho3D::Actions::FiniteTimeActionState.

◆ Stop()

void Urho3D::Actions::ActionState::Stop ( )
virtual

Called after the action has finished. It will set the 'Target' to null. IMPORTANT: You should never call this method manually. Instead, use: "target.StopAction(actionState);"

Reimplemented in Urho3D::Actions::AttributeBlinkState.

◆ Update()

void Urho3D::Actions::ActionState::Update ( float  time)
virtual

Called once per frame. Time value is between 0 and 1 For example: 0 means that the action just started 0.5 means that the action is in the middle 1 means that the action is over

Reimplemented in Urho3D::Actions::AttributeActionState.


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