OSDN Git Service
(root)
/
mikumikustudio
/
libgdx-mikumikustudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3862e5b
)
[changed] AnimationAction has a new method called getTarget() which returns the Actor...
author
badlogicgames
<badlogicgames@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Tue, 8 Feb 2011 18:49:45 +0000
(18:49 +0000)
committer
badlogicgames
<badlogicgames@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Tue, 8 Feb 2011 18:49:45 +0000
(18:49 +0000)
gdx/src/com/badlogic/gdx/scenes/scene2d/Action.java
patch
|
blob
|
history
gdx/src/com/badlogic/gdx/scenes/scene2d/AnimationAction.java
patch
|
blob
|
history
gdx/src/com/badlogic/gdx/scenes/scene2d/OnActionCompleted.java
patch
|
blob
|
history
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/Delay.java
patch
|
blob
|
history
diff --git
a/gdx/src/com/badlogic/gdx/scenes/scene2d/Action.java
b/gdx/src/com/badlogic/gdx/scenes/scene2d/Action.java
index
d117396
..
376f38b
100644
(file)
--- a/
gdx/src/com/badlogic/gdx/scenes/scene2d/Action.java
+++ b/
gdx/src/com/badlogic/gdx/scenes/scene2d/Action.java
@@
-30,7
+30,7
@@
public abstract class Action {
*
\r
* @param actor the actor.
\r
*/
\r
- public abstract void setTarget (Actor actor);
\r
+ public abstract void setTarget (Actor actor);
\r
\r
/**
\r
* Apply the action.
\r
diff --git
a/gdx/src/com/badlogic/gdx/scenes/scene2d/AnimationAction.java
b/gdx/src/com/badlogic/gdx/scenes/scene2d/AnimationAction.java
index
1520b2e
..
648c875
100644
(file)
--- a/
gdx/src/com/badlogic/gdx/scenes/scene2d/AnimationAction.java
+++ b/
gdx/src/com/badlogic/gdx/scenes/scene2d/AnimationAction.java
@@
-64,4
+64,11
@@
public abstract class AnimationAction extends Action {
return interpolatedTime * invDuration;
\r
}
\r
}
\r
+
\r
+ /**
\r
+ * @return the {@link Actor} this Action applies to.
\r
+ */
\r
+ public Actor getTarget() {
\r
+ return target;
\r
+ }
\r
}
\r
diff --git
a/gdx/src/com/badlogic/gdx/scenes/scene2d/OnActionCompleted.java
b/gdx/src/com/badlogic/gdx/scenes/scene2d/OnActionCompleted.java
index
6010cd7
..
b24b3d6
100644
(file)
--- a/
gdx/src/com/badlogic/gdx/scenes/scene2d/OnActionCompleted.java
+++ b/
gdx/src/com/badlogic/gdx/scenes/scene2d/OnActionCompleted.java
@@
-12,7
+12,9
@@
public interface OnActionCompleted {
/**
\r
* Called when the {@link Action} is completed. Note that this
\r
* might get called multiple times in case the Action is part of
\r
- * a {@link Repeat} Action.
\r
+ * a {@link Repeat} Action. If the Action is an {@link AnimationAction}
\r
+ * then you can cast to this class and receive the targeted {link Actor}
\r
+ * via {@link AnimationAction#getTarget()}.
\r
* @param action the Action.
\r
*/
\r
public void completed(Action action);
\r
diff --git
a/gdx/src/com/badlogic/gdx/scenes/scene2d/actions/Delay.java
b/gdx/src/com/badlogic/gdx/scenes/scene2d/actions/Delay.java
index
b751273
..
93a0698
100644
(file)
--- a/
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/Delay.java
+++ b/
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/Delay.java
@@
-58,5
+58,5
@@
public class Delay extends Action {
\r
@Override public Action copy () {
\r
return $(action.copy(), duration);
\r
- }
\r
+ }
\r
}
\r