summary refs log tree commit diff stats
path: root/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2009-01-17 10:36:37 -0500
committerStarla Insigna <hatkirby@fourisland.com>2009-01-17 10:36:37 -0500
commit69b495c392bffe96dab97306a42466edd4b2474e (patch)
tree2adccc01f4027bcb76bbefee03bb6a9622ce3e00 /src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic
parent4c768483aecd687529b9abb48ed42950fabc886f (diff)
downloadfourpuzzle-69b495c392bffe96dab97306a42466edd4b2474e.tar.gz
fourpuzzle-69b495c392bffe96dab97306a42466edd4b2474e.tar.bz2
fourpuzzle-69b495c392bffe96dab97306a42466edd4b2474e.zip
Imported sources
Diffstat (limited to 'src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic')
-rw-r--r--src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/BlankEventGraphic.java40
-rw-r--r--src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/CharSetEventGraphic.java68
-rw-r--r--src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/EventGraphic.java25
3 files changed, 133 insertions, 0 deletions
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/BlankEventGraphic.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/BlankEventGraphic.java new file mode 100644 index 0000000..592c8a7 --- /dev/null +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/BlankEventGraphic.java
@@ -0,0 +1,40 @@
1/*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5
6package com.fourisland.fourpuzzle.gamestate.mapview.event.graphic;
7
8import com.fourisland.fourpuzzle.Direction;
9import java.awt.image.BufferedImage;
10
11/**
12 *
13 * @author hatkirby
14 */
15public class BlankEventGraphic implements EventGraphic {
16
17 private Direction direction;
18 private int animationStep;
19
20 public BufferedImage getImage() throws Exception {
21 return null;
22 }
23
24 public Direction getDirection() {
25 return direction;
26 }
27
28 public void setDirection(Direction direction) {
29 this.direction = direction;
30 }
31
32 public int getAnimationStep() {
33 return animationStep;
34 }
35
36 public void setAnimationStep(int animationStep) {
37 this.animationStep = animationStep;
38 }
39
40}
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/CharSetEventGraphic.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/CharSetEventGraphic.java new file mode 100644 index 0000000..b71a0b8 --- /dev/null +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/CharSetEventGraphic.java
@@ -0,0 +1,68 @@
1/*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5
6package com.fourisland.fourpuzzle.gamestate.mapview.event.graphic;
7
8import com.fourisland.fourpuzzle.Direction;
9import com.fourisland.fourpuzzle.gamestate.mapview.CharSet;
10import java.awt.image.BufferedImage;
11
12/**
13 *
14 * @author hatkirby
15 */
16public class CharSetEventGraphic implements EventGraphic {
17
18 private Direction direction = Direction.South;
19 private int animationStep = 1;
20 private String graphic;
21 private int graphicOffset;
22
23 public CharSetEventGraphic(String graphic, int graphicOffset)
24 {
25 this.graphic = graphic;
26 this.graphicOffset = graphicOffset;
27 }
28
29 public BufferedImage getImage() throws Exception
30 {
31 return CharSet.getCharSet(getGraphic()).getImage(getGraphicOffset(), getDirection(), getAnimationStep());
32 }
33
34 public Direction getDirection()
35 {
36 return direction;
37 }
38
39 public void setDirection(Direction direction)
40 {
41 this.direction = direction;
42 }
43
44 public String getGraphic() {
45 return graphic;
46 }
47
48 public void setGraphic(String graphic) {
49 this.graphic = graphic;
50 }
51
52 public int getGraphicOffset() {
53 return graphicOffset;
54 }
55
56 public void setGraphicOffset(int graphicOffset) {
57 this.graphicOffset = graphicOffset;
58 }
59
60 public int getAnimationStep() {
61 return animationStep;
62 }
63
64 public void setAnimationStep(int animationStep) {
65 this.animationStep = animationStep;
66 }
67
68}
diff --git a/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/EventGraphic.java b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/EventGraphic.java new file mode 100644 index 0000000..60afca5 --- /dev/null +++ b/src/com/fourisland/fourpuzzle/gamestate/mapview/event/graphic/EventGraphic.java
@@ -0,0 +1,25 @@
1/*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5
6package com.fourisland.fourpuzzle.gamestate.mapview.event.graphic;
7
8import com.fourisland.fourpuzzle.Direction;
9import java.awt.image.BufferedImage;
10
11/**
12 *
13 * @author hatkirby
14 */
15public interface EventGraphic {
16
17 public BufferedImage getImage() throws Exception;
18
19 public Direction getDirection();
20 public void setDirection(Direction direction);
21
22 public int getAnimationStep();
23 public void setAnimationStep(int animationStep);
24
25}