@@ -4,7 +4,7 @@ namespace CC
44{
55
66
7- public class Action : BaseAction
7+ public abstract class Action : BaseAction
88 {
99 protected Transform target ;
1010 bool isStarted ;
@@ -21,14 +21,9 @@ public static void Run(Transform targetTransform ,Action anAction)
2121 ActionRunner . Setup ( targetTransform , anAction ) ;
2222 }
2323
24- public virtual void LerpAction ( float delta )
25- {
26- }
24+ public abstract void LerpAction ( float delta ) ;
2725
28- public virtual void Update ( float delta )
29- {
30-
31- }
26+ public abstract void Update ( float delta ) ;
3227
3328 public virtual void StartWithTarget ( Transform inTarget )
3429 {
@@ -45,6 +40,20 @@ public virtual bool IsDone()
4540 {
4641 return true ;
4742 }
43+
44+
45+
46+
47+
48+ /** Returns a new action that performs the exactly the reverse action.
49+ *
50+ * @return A new action that performs the exactly the reverse action.
51+ */
52+ public abstract Action Reverse ( ) ;
53+
54+
55+ public abstract Action Clone ( ) ;
56+
4857 }
4958
5059
@@ -57,14 +66,24 @@ public virtual bool IsDone()
5766 * Infinite time actions are valid.
5867 */
5968
60- public class FiniteTimeAction : Action
69+ public abstract class FiniteTimeAction : Action
6170 {
6271 protected float duration ;
6372
6473 public float GetDuration ( )
6574 {
6675 return duration ;
6776 }
77+
78+ public FiniteTimeAction ( float aduration )
79+ {
80+ duration = aduration ;
81+ }
82+
83+
84+
85+
86+
6887 }
6988
7089}
0 commit comments