Skip to content
37 changes: 28 additions & 9 deletions Assets/Plugins/UnityActions/Scripts/Actions/Action.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace CC
{


public class Action : BaseAction
public abstract class Action : BaseAction
{
protected Transform target;
bool isStarted;
Expand All @@ -21,14 +21,9 @@ public static void Run(Transform targetTransform ,Action anAction)
ActionRunner.Setup(targetTransform,anAction);
}

public virtual void LerpAction(float delta)
{
}
public abstract void LerpAction(float delta);

public virtual void Update(float delta)
{

}
public abstract void Update(float delta);

public virtual void StartWithTarget(Transform inTarget)
{
Expand All @@ -45,6 +40,20 @@ public virtual bool IsDone()
{
return true;
}





/** Returns a new action that performs the exactly the reverse action.
*
* @return A new action that performs the exactly the reverse action.
*/
public abstract Action Reverse() ;


public abstract Action Clone();

}


Expand All @@ -57,14 +66,24 @@ public virtual bool IsDone()
* Infinite time actions are valid.
*/

public class FiniteTimeAction : Action
public abstract class FiniteTimeAction : Action
{
protected float duration;

public float GetDuration()
{
return duration;
}

public FiniteTimeAction(float aduration)
{
duration = aduration;
}





}

}
Expand Down
Loading