Urho.Actions.ActionInstant Class

Base class for actions that have an immediate effect.

See Also: ActionInstant


public class ActionInstant : FiniteTimeAction


This is a base class that will invoke the Update method in the ActionState with the value of one as soon as it is executed.   

The following example shows how you would implement an instant:

C# Example

public class MyInstant : ActionInstant
    public MyInstant () {}
    protected internal override ActionState StartAction(Node target)
        return new MyInstantState (this, target);

    public override FiniteTimeAction Reverse ()
        return (new MyInstantReverse ());

public class MyInstantState : ActionInstantState
    public MyInstantState (MyInstant action, Node target)
        : base (action, target) {}
    public override void Update (float time)

In this imaginary action, you there would be an inverse operation called “MyInstantReverse”, which is used to implement the Reverse method in this case.

The “PerformOp” call is the one that does the change, and it will be invoked only once.


Namespace: Urho.Actions
Assembly: Urho (in Urho.dll)
Assembly Versions:

The members of Urho.Actions.ActionInstant are listed below.

See Also: FiniteTimeAction

Protected Constructors

Creates a new instance of the instant action

Public Methods

Reverse() : FiniteTimeAction
This method must be overwritten and return the reverse action of your custom action.

Protected Methods

StartAction(Node) : ActionState
Creates the action state for this action, called on demand from the framework to start executing the recipe.