aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Martindale <awiamartindale@googlemail.com>2011-09-07 11:30:14 +0100
committerAdam Martindale <awiamartindale@googlemail.com>2011-09-07 11:30:14 +0100
commitdc16d95ed5a4b5f15f327cbe609414dc9e5d6225 (patch)
tree0dc685a25954827c07fa765e50b9bf5db868bb9d
parentcfa29ad09cc9974a0a55e5b25bcc5f59a71d5950 (diff)
downloadpunchingbag-dc16d95ed5a4b5f15f327cbe609414dc9e5d6225.tar
punchingbag-dc16d95ed5a4b5f15f327cbe609414dc9e5d6225.tar.gz
Begun adding text effect
-rw-r--r--PunchingBag/src/PunchingBag.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/PunchingBag/src/PunchingBag.java b/PunchingBag/src/PunchingBag.java
index b36f562..d6eca55 100644
--- a/PunchingBag/src/PunchingBag.java
+++ b/PunchingBag/src/PunchingBag.java
@@ -1,5 +1,6 @@
import javax.swing.event.EventListenerList;
+import java.awt.geom.Area;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
@@ -24,6 +25,10 @@ public class PunchingBag implements Runnable {
None, Red, Yellow, Green
};
+ public enum Direction {
+ Right, Left, Up, Down
+ };
+
// Is there a better class for this? One that it is not a swing class.
private EventListenerList buttonListenerList = new EventListenerList();
private EventListenerList ledListenerList = new EventListenerList();
@@ -79,6 +84,26 @@ public class PunchingBag implements Runnable {
abstract public void draw();
}
+ class Text extends Effect {
+ final String string;
+ final Area area;
+ final Direction direction;
+ final int speed;
+
+ public Text(String string, Area area, Direction direction, int speed) {
+ this.string = string;
+ this.area = area;
+ this.direction = direction;
+ this.speed = speed;
+
+ }
+
+ public void draw() {
+ byte[] stringBytes = string.getBytes();
+
+ }
+ }
+
class CircleExpand extends Effect {
final int x;
final int y;