The fineness of FoodMaker can be specified.
@@ -97,8 +97,8 @@ | ||
97 | 97 | return cost; |
98 | 98 | } |
99 | 99 | |
100 | - public GarbageChute(int initX, int initY, Direction initDir) { | |
101 | - super(initX, initY, ObjEX.Direction.BACK); | |
100 | + public GarbageChute(int initX, int initY) { | |
101 | + super(initX, initY); | |
102 | 102 | objType = Type.PLATFORM; |
103 | 103 | } |
104 | 104 | } |
\ No newline at end of file |
@@ -104,8 +104,8 @@ | ||
104 | 104 | return cost; |
105 | 105 | } |
106 | 106 | |
107 | - public MachinePress(int initX, int initY, Direction initDir) { | |
108 | - super(initX, initY, initDir); | |
107 | + public MachinePress(int initX, int initY) { | |
108 | + super(initX, initY); | |
109 | 109 | objType = Type.FIX_OBJECT; |
110 | 110 | } |
111 | 111 | } |
\ No newline at end of file |
@@ -25,6 +25,9 @@ | ||
25 | 25 | private static final int images_num = 1; // このクラスの総使用画像数 |
26 | 26 | private static Image[] images = new Image[images_num]; |
27 | 27 | |
28 | + public static enum PoolType { | |
29 | + NORMAL, RESCUE | |
30 | + } | |
28 | 31 | private boolean rescue; |
29 | 32 | private static int[] value = {500, 10000}; |
30 | 33 | private static int[] cost = {10, 200}; |
@@ -114,15 +117,15 @@ | ||
114 | 117 | return cost[type]; |
115 | 118 | } |
116 | 119 | |
117 | - public OrangePool(int initX, int initY, Direction initDir) { | |
118 | - super(initX, initY, ObjEX.Direction.BACK); | |
119 | - switch (initDir) { // 方向データを仮利用 | |
120 | - case BACK: | |
120 | + public OrangePool(int initX, int initY, PoolType poolType) { | |
121 | + super(initX, initY); | |
122 | + switch (poolType) { | |
123 | + case NORMAL: | |
121 | 124 | default: |
122 | 125 | rescue = false; |
123 | 126 | type = 0; |
124 | 127 | break; |
125 | - case THISSIDE: | |
128 | + case RESCUE: | |
126 | 129 | rescue = true; |
127 | 130 | type = 1; |
128 | 131 | break; |
@@ -16,7 +16,7 @@ | ||
16 | 16 | { "name": "Breeding pool", "submenu": ["Low-priced", "Full-bodied", "Growth-promoting", "Professional-use"] }, |
17 | 17 | { "name": "Garbage chute" }, |
18 | 18 | { "name": "Machine press" }, |
19 | - { "name": "Food maker" }, | |
19 | + { "name": "Food maker", "submenu": ["Fine", "Medium", "Rough"] }, | |
20 | 20 | { "name": "Orange pool", "submenu": ["For drink", "For rescue use"] }, |
21 | 21 | { "name": "Product chute" } ], |
22 | 22 | [ { "name": "Pause" }, |
@@ -16,7 +16,7 @@ | ||
16 | 16 | { "name": "養殖プール", "submenu": ["廉価品", "こくまろ", "高速成長薬添加", "プロ用"] }, |
17 | 17 | { "name": "ダストシュート" }, |
18 | 18 | { "name": "プレス機" }, |
19 | - { "name": "フードメーカー" }, | |
19 | + { "name": "フードメーカー", "submenu": ["細かい", "中くらい", "粗い"] }, | |
20 | 20 | { "name": "オレンジプール", "submenu": ["清涼飲料水", "救命用"] }, |
21 | 21 | { "name": "製品投入口" } ], |
22 | 22 | [ { "name": "一時停止" }, |
@@ -26,6 +26,11 @@ | ||
26 | 26 | private static final int images_num = 6; // このクラスの総使用画像数 |
27 | 27 | private static int AnimeImagesNum[] = {6};// アニメごとに何枚使うか |
28 | 28 | private static Image[] images = new Image[images_num]; |
29 | + | |
30 | + public static enum MakerType { | |
31 | + FINE, MEDIUM, ROUGH | |
32 | + } | |
33 | + private MakerType type; | |
29 | 34 | |
30 | 35 | protected boolean processReady = true; |
31 | 36 | private static int value = 30000; |
@@ -92,10 +97,25 @@ | ||
92 | 97 | Food.type foodType = null; |
93 | 98 | int foodNum = 1; |
94 | 99 | int foodAmount = -1; |
95 | - if (o.objType == Obj.Type.YUKKURI) { | |
100 | + if (o.objType == Type.YUKKURI) { | |
96 | 101 | Body b = (Body)o; |
97 | - if (!b.isCrashed() && !b.isBaby()) { | |
98 | - return; | |
102 | + if (!b.isCrashed()) { | |
103 | + switch (type) { | |
104 | + case FINE: | |
105 | + return; | |
106 | + case MEDIUM: | |
107 | + if (!b.isBaby()) { | |
108 | + return; | |
109 | + } | |
110 | + break; | |
111 | + case ROUGH: | |
112 | + if (!b.isBaby() && !b.isChild()) { | |
113 | + return; | |
114 | + } | |
115 | + break; | |
116 | + default: | |
117 | + break; | |
118 | + } | |
99 | 119 | } |
100 | 120 | if (shitCount != 0) { |
101 | 121 | foodType = Food.type.BITTER; |
@@ -214,8 +234,9 @@ | ||
214 | 234 | return cost; |
215 | 235 | } |
216 | 236 | |
217 | - public FoodMaker(int initX, int initY, Direction initDir) { | |
218 | - super(initX, initY, ObjEX.Direction.BACK); | |
237 | + public FoodMaker(int initX, int initY, MakerType makerType) { | |
238 | + super(initX, initY); | |
219 | 239 | objType = Type.PLATFORM; |
240 | + type = makerType; | |
220 | 241 | } |
221 | 242 | } |
\ No newline at end of file |
@@ -20,16 +20,6 @@ | ||
20 | 20 | static final long serialVersionUID = 1L; |
21 | 21 | |
22 | 22 | protected Image[] images; |
23 | - | |
24 | - public static enum Direction { | |
25 | - BACK, THISSIDE, RIGHT, LEFT | |
26 | - }; | |
27 | - | |
28 | - public static final int PLATFORM_BACK = 0; | |
29 | - public static final int PLATFORM_THISSIDE = 1; | |
30 | - public static final int PLATFORM_RIGHT = 2; | |
31 | - public static final int PLATFORM_LEFT = 3; | |
32 | - protected Direction direction; | |
33 | 23 | protected static int size; |
34 | 24 | |
35 | 25 | // getSize() for static style |
@@ -36,10 +26,6 @@ | ||
36 | 26 | public static int getSizeS() { |
37 | 27 | return size; |
38 | 28 | } |
39 | - | |
40 | - public Direction getDirection() { | |
41 | - return direction; | |
42 | - } | |
43 | 29 | |
44 | 30 | public String getMessage() { |
45 | 31 | return null; |
@@ -128,11 +114,10 @@ | ||
128 | 114 | return Event.DONOTHING; |
129 | 115 | } |
130 | 116 | |
131 | - public ObjEX(int initX, int initY, Direction initDir) { | |
117 | + public ObjEX(int initX, int initY) { | |
132 | 118 | objType = Type.PLATFORM; |
133 | 119 | x = initX; |
134 | 120 | y = initY; |
135 | 121 | z = 0; |
136 | - direction = initDir; | |
137 | 122 | } |
138 | 123 | } |
\ No newline at end of file |
@@ -26,6 +26,9 @@ | ||
26 | 26 | private static final int images_num = 1; // このクラスの総使用画像数 |
27 | 27 | private static Image[] images = new Image[images_num]; |
28 | 28 | |
29 | + public static enum PoolType { | |
30 | + NONE, HIGHDENSITY, RAPIDGROWTH, BOTH | |
31 | + } | |
29 | 32 | private boolean highDensity; |
30 | 33 | private boolean rapidGrowth; |
31 | 34 | private static int[] value = {1000, 4000, 4000, 10000}; |
@@ -96,28 +99,28 @@ | ||
96 | 99 | return cost[type]; |
97 | 100 | } |
98 | 101 | |
99 | - public BreedingPool(int initX, int initY, Direction initDir) { | |
100 | - super(initX, initY, ObjEX.Direction.BACK); | |
101 | - switch (initDir) { // 方向データを仮利用 | |
102 | - case BACK: | |
102 | + public BreedingPool(int initX, int initY, PoolType poolType) { | |
103 | + super(initX, initY); | |
104 | + switch (poolType) { | |
105 | + case NONE: | |
103 | 106 | default: |
104 | 107 | highDensity = false; |
105 | 108 | rapidGrowth = false; |
106 | 109 | break; |
107 | - case THISSIDE: | |
110 | + case HIGHDENSITY: | |
108 | 111 | highDensity = true; |
109 | 112 | rapidGrowth = false; |
110 | 113 | break; |
111 | - case RIGHT: | |
114 | + case RAPIDGROWTH: | |
112 | 115 | highDensity = false; |
113 | 116 | rapidGrowth = true; |
114 | 117 | break; |
115 | - case LEFT: | |
118 | + case BOTH: | |
116 | 119 | highDensity = true; |
117 | 120 | rapidGrowth = true; |
118 | 121 | break; |
119 | 122 | } |
120 | 123 | objType = Type.PLATFORM; |
121 | - type = initDir.ordinal(); | |
124 | + type = poolType.ordinal(); | |
122 | 125 | } |
123 | 126 | } |
\ No newline at end of file |
@@ -130,8 +130,8 @@ | ||
130 | 130 | return cost; |
131 | 131 | } |
132 | 132 | |
133 | - public ProductChute(int initX, int initY, Direction initDir) { | |
134 | - super(initX, initY, ObjEX.Direction.BACK); | |
133 | + public ProductChute(int initX, int initY) { | |
134 | + super(initX, initY); | |
135 | 135 | objType = Type.PLATFORM; |
136 | 136 | } |
137 | 137 | } |
\ No newline at end of file |
@@ -780,35 +780,35 @@ | ||
780 | 780 | |
781 | 781 | } |
782 | 782 | |
783 | - public void buyObjEx( int addObjEX, int x, int y, ObjEX.Direction dir) { | |
783 | + public void buyObjEx( int addObjEX, int x, int y, Object option) { | |
784 | 784 | ObjEX o; |
785 | 785 | switch(addObjEX){ |
786 | 786 | case SimYukkuri.BELTCONVEYOR: |
787 | - o = new Beltconveyor(x, y, dir); | |
787 | + o = new Beltconveyor(x, y, (Beltconveyor.Direction)option); | |
788 | 788 | objExList.add(o); |
789 | 789 | break; |
790 | 790 | case SimYukkuri.BREEDINGPOOL: |
791 | - o = new BreedingPool(x, y, dir); | |
791 | + o = new BreedingPool(x, y, (BreedingPool.PoolType)option); | |
792 | 792 | objExList.add(o); |
793 | 793 | break; |
794 | 794 | case SimYukkuri.GARBAGECHUTE: |
795 | - o = new GarbageChute(x, y, dir); | |
795 | + o = new GarbageChute(x, y); | |
796 | 796 | objExList.add(o); |
797 | 797 | break; |
798 | 798 | case SimYukkuri.MACHINEPRESS: |
799 | - o = new MachinePress(x, y, dir); | |
799 | + o = new MachinePress(x, y); | |
800 | 800 | fixedObjExList.add(o); |
801 | 801 | break; |
802 | 802 | case SimYukkuri.FOODMAKER: |
803 | - o = new FoodMaker(x, y, dir); | |
803 | + o = new FoodMaker(x, y, (FoodMaker.MakerType)option); | |
804 | 804 | objExList.add(o); |
805 | 805 | break; |
806 | 806 | case SimYukkuri.ORANGEPOOL: |
807 | - o = new OrangePool(x, y, dir); | |
807 | + o = new OrangePool(x, y, (OrangePool.PoolType)option); | |
808 | 808 | objExList.add(o); |
809 | 809 | break; |
810 | 810 | case SimYukkuri.PRODUCTCHUTE: |
811 | - o = new ProductChute(x, y, dir); | |
811 | + o = new ProductChute(x, y); | |
812 | 812 | objExList.add(o); |
813 | 813 | break; |
814 | 814 | default: |
@@ -26,6 +26,11 @@ | ||
26 | 26 | private static int AnimeImagesNum[] = {5, 5};// アニメごとに何枚使うか |
27 | 27 | private static Image[] images = new Image[images_num]; |
28 | 28 | |
29 | + public static enum Direction { | |
30 | + BACK, THISSIDE, RIGHT, LEFT | |
31 | + }; | |
32 | + protected Direction direction; | |
33 | + | |
29 | 34 | private int beltSpeed; |
30 | 35 | private static final int value = 2000; |
31 | 36 | private static final int cost = 1; |
@@ -40,7 +45,7 @@ | ||
40 | 45 | |
41 | 46 | @Override |
42 | 47 | public Image getImage() { |
43 | - switch (direction) { // 楽にアニメ指定できるようにしたいが後で | |
48 | + switch (direction) { | |
44 | 49 | case BACK: |
45 | 50 | default: |
46 | 51 | return images[(int)age / 4 % AnimeImagesNum[0]]; // 4フレームに1回画像更新 |
@@ -78,7 +83,7 @@ | ||
78 | 83 | int objY = o.getY(); |
79 | 84 | int objSize = o.getSize(); |
80 | 85 | if (!Terrarium.onBarrier(objX, objY, objSize / 2, objSize / 4)) { // 壁にひっかかっていれば移動させない |
81 | - switch (getDirection()) { // 移動させる方向 | |
86 | + switch (direction) { // 移動させる方向 | |
82 | 87 | case BACK: |
83 | 88 | default: |
84 | 89 | o.setY(objY - beltSpeed); |
@@ -122,8 +127,9 @@ | ||
122 | 127 | } |
123 | 128 | |
124 | 129 | public Beltconveyor(int initX, int initY, Direction initDir) { |
125 | - super(initX, initY, initDir); | |
130 | + super(initX, initY); | |
126 | 131 | objType = Type.PLATFORM; |
127 | 132 | beltSpeed = 1; |
133 | + direction = initDir; | |
128 | 134 | } |
129 | 135 | } |
\ No newline at end of file |
@@ -43,13 +43,11 @@ | ||
43 | 43 | static boolean initialized = false; |
44 | 44 | |
45 | 45 | static final int TOOL = 0, FOOD = 1, CLEAN = 2, ACCESSORY = 3, PICKUP = 4, PANTS = 5, TOILET = 6, BARRIER = 7, TOYS = 8, BELTCONVEYOR = 9, BREEDINGPOOL = 10 ,GARBAGECHUTE = 11, MACHINEPRESS = 12, FOODMAKER = 13, ORANGEPOOL = 14, PRODUCTCHUTE = 15; |
46 | - | |
47 | 46 | static final int PUNISH = 0, HAMMER = 1, VIBRATOR = 2, JUICE = 3, DECOPING = 4; |
48 | - static final int BACK = 0, THISSIDE = 1, RIGHT = 2, LEFT = 3; | |
49 | 47 | static final int NORMAL = 0, BITTER = 1, SELFFEEDER = 2, LEMONPOP = 3, HOT = 4, VIYUGRA = 5, FUNGICIDE = 6; |
50 | 48 | static final int INDIVIDUAL = 0, ALL = 1; |
51 | 49 | static final int SET = 0, DEL = 1; |
52 | - static int selectedTool = 0, selectedFood = 0, selectedCleaner = 0, selectedBarrier = 0, selectedBeltconveyor = 0, selectedBreedingPool = 0, selectedOrangePool = 0, selectedGameSpeed = 1; | |
50 | + static int selectedTool = 0, selectedFood = 0, selectedCleaner = 0, selectedBarrier = 0, selectedBeltconveyor = 0, selectedBreedingPool = 0, selectedOrangePool = 0, selectedGameSpeed = 1, selectedFoodMaker = 0; | |
53 | 51 | JLabel title; |
54 | 52 | JPanel rootPane = new JPanel(); |
55 | 53 | JPanel buttonPane = new JPanel(); |
@@ -239,7 +237,7 @@ | ||
239 | 237 | break; |
240 | 238 | case FOOD: |
241 | 239 | s2.setSelectedIndex(selectedFood); |
242 | - break; | |
240 | + break; | |
243 | 241 | case CLEAN: |
244 | 242 | s2.setSelectedIndex(selectedCleaner); |
245 | 243 | break; |
@@ -247,11 +245,17 @@ | ||
247 | 245 | s2.setSelectedIndex(selectedBarrier); |
248 | 246 | break; |
249 | 247 | case BELTCONVEYOR: |
248 | + s2.setSelectedIndex(selectedBeltconveyor); | |
249 | + break; | |
250 | + case BREEDINGPOOL: | |
250 | 251 | s2.setSelectedIndex(selectedBreedingPool); |
251 | 252 | break; |
252 | 253 | case ORANGEPOOL: |
253 | - s2.setSelectedIndex(selectedBreedingPool); | |
254 | - break; | |
254 | + s2.setSelectedIndex(selectedOrangePool); | |
255 | + break; | |
256 | + case FOODMAKER: | |
257 | + s2.setSelectedIndex(selectedFoodMaker); | |
258 | + break; | |
255 | 259 | default: |
256 | 260 | s2.setSelectedIndex(0); |
257 | 261 | break; |
@@ -288,6 +292,23 @@ | ||
288 | 292 | case CLEAN: |
289 | 293 | selectedCleaner = s2.getSelectedIndex(); |
290 | 294 | break; |
295 | + case BARRIER: | |
296 | + selectedBarrier = s2.getSelectedIndex(); | |
297 | + break; | |
298 | + case BELTCONVEYOR: | |
299 | + selectedBeltconveyor = s2.getSelectedIndex(); | |
300 | + break; | |
301 | + case BREEDINGPOOL: | |
302 | + selectedBreedingPool = s2.getSelectedIndex(); | |
303 | + break; | |
304 | + case ORANGEPOOL: | |
305 | + selectedOrangePool = s2.getSelectedIndex(); | |
306 | + break; | |
307 | + case FOODMAKER: | |
308 | + selectedFoodMaker = s2.getSelectedIndex(); | |
309 | + break; | |
310 | + default: | |
311 | + break; | |
291 | 312 | } |
292 | 313 | } |
293 | 314 | else if (e.getSource() == s3) { |
@@ -643,20 +664,20 @@ | ||
643 | 664 | x = Translate.invX(e.getX(), e.getY(), Beltconveyor.getSizeS(), w, h); |
644 | 665 | y = Translate.invY(e.getX(), e.getY(), Beltconveyor.getSizeS() / 2, w, h); |
645 | 666 | if (x >= 0 && x <= Terrarium.MAX_X && y >= 0 && y <= Terrarium.MAX_Y) { |
646 | - ObjEX.Direction dir; | |
667 | + Beltconveyor.Direction dir; | |
647 | 668 | switch (s2.getSelectedIndex()) { |
648 | - case BACK: | |
669 | + case 0: | |
649 | 670 | default: |
650 | - dir = ObjEX.Direction.BACK; | |
671 | + dir = Beltconveyor.Direction.BACK; | |
651 | 672 | break; |
652 | - case THISSIDE: | |
653 | - dir = ObjEX.Direction.THISSIDE; | |
673 | + case 1: | |
674 | + dir = Beltconveyor.Direction.THISSIDE; | |
654 | 675 | break; |
655 | - case RIGHT: | |
656 | - dir = ObjEX.Direction.RIGHT; | |
676 | + case 2: | |
677 | + dir = Beltconveyor.Direction.RIGHT; | |
657 | 678 | break; |
658 | - case LEFT: | |
659 | - dir = ObjEX.Direction.LEFT; | |
679 | + case 3: | |
680 | + dir = Beltconveyor.Direction.LEFT; | |
660 | 681 | break; |
661 | 682 | } |
662 | 683 | mypane.terrarium.buyObjEx(BELTCONVEYOR, x, y, dir); |
@@ -666,23 +687,23 @@ | ||
666 | 687 | x = Translate.invX(e.getX(), e.getY(), BreedingPool.getSizeS(), w, h); |
667 | 688 | y = Translate.invY(e.getX(), e.getY(), BreedingPool.getSizeS() / 2, w, h); |
668 | 689 | if (x >= 0 && x <= Terrarium.MAX_X && y >= 0 && y <= Terrarium.MAX_Y) { |
669 | - ObjEX.Direction dir; | |
690 | + BreedingPool.PoolType type; | |
670 | 691 | switch (s2.getSelectedIndex()) { |
671 | - case BACK: | |
692 | + case 0: | |
672 | 693 | default: |
673 | - dir = ObjEX.Direction.BACK; | |
694 | + type = BreedingPool.PoolType.NONE; | |
674 | 695 | break; |
675 | - case THISSIDE: | |
676 | - dir = ObjEX.Direction.THISSIDE; | |
696 | + case 1: | |
697 | + type = BreedingPool.PoolType.HIGHDENSITY; | |
677 | 698 | break; |
678 | - case RIGHT: | |
679 | - dir = ObjEX.Direction.RIGHT; | |
699 | + case 2: | |
700 | + type = BreedingPool.PoolType.RAPIDGROWTH; | |
680 | 701 | break; |
681 | - case LEFT: | |
682 | - dir = ObjEX.Direction.LEFT; | |
702 | + case 3: | |
703 | + type = BreedingPool.PoolType.BOTH; | |
683 | 704 | break; |
684 | 705 | } |
685 | - mypane.terrarium.buyObjEx(BREEDINGPOOL, x, y, dir); | |
706 | + mypane.terrarium.buyObjEx(BREEDINGPOOL, x, y, type); | |
686 | 707 | } |
687 | 708 | break; |
688 | 709 | case GARBAGECHUTE: |
@@ -689,7 +710,7 @@ | ||
689 | 710 | x = Translate.invX(e.getX(), e.getY(), GarbageChute.getSizeS(), w, h); |
690 | 711 | y = Translate.invY(e.getX(), e.getY(), GarbageChute.getSizeS() / 2, w, h); |
691 | 712 | if (x >= 0 && x <= Terrarium.MAX_X && y >= 0 && y <= Terrarium.MAX_Y) { |
692 | - mypane.terrarium.buyObjEx(GARBAGECHUTE, x, y, ObjEX.Direction.BACK); | |
713 | + mypane.terrarium.buyObjEx(GARBAGECHUTE, x, y, null); | |
693 | 714 | } |
694 | 715 | break; |
695 | 716 | case MACHINEPRESS: |
@@ -696,7 +717,7 @@ | ||
696 | 717 | x = Translate.invX(e.getX(), e.getY(), MachinePress.getSizeS(), w, h); |
697 | 718 | y = Translate.invY(e.getX(), e.getY(), MachinePress.getSizeS() / 2, w, h); |
698 | 719 | if (x >= 0 && x <= Terrarium.MAX_X && y >= 0 && y <= Terrarium.MAX_Y) { |
699 | - mypane.terrarium.buyObjEx(MACHINEPRESS, x, y, ObjEX.Direction.BACK); | |
720 | + mypane.terrarium.buyObjEx(MACHINEPRESS, x, y, null); | |
700 | 721 | } |
701 | 722 | break; |
702 | 723 | case FOODMAKER: |
@@ -703,7 +724,20 @@ | ||
703 | 724 | x = Translate.invX(e.getX(), e.getY(), FoodMaker.getSizeS(), w, h); |
704 | 725 | y = Translate.invY(e.getX(), e.getY(), FoodMaker.getSizeS() / 2, w, h); |
705 | 726 | if (x >= 0 && x <= Terrarium.MAX_X && y >= 0 && y <= Terrarium.MAX_Y) { |
706 | - mypane.terrarium.buyObjEx(FOODMAKER, x, y, ObjEX.Direction.BACK); | |
727 | + FoodMaker.MakerType type; | |
728 | + switch (s2.getSelectedIndex()) { | |
729 | + case 0: | |
730 | + default: | |
731 | + type = FoodMaker.MakerType.FINE; | |
732 | + break; | |
733 | + case 1: | |
734 | + type = FoodMaker.MakerType.MEDIUM; | |
735 | + break; | |
736 | + case 2: | |
737 | + type = FoodMaker.MakerType.ROUGH; | |
738 | + break; | |
739 | + } | |
740 | + mypane.terrarium.buyObjEx(FOODMAKER, x, y, type); | |
707 | 741 | } |
708 | 742 | break; |
709 | 743 | case ORANGEPOOL: |
@@ -710,23 +744,17 @@ | ||
710 | 744 | x = Translate.invX(e.getX(), e.getY(), OrangePool.getSizeS(), w, h); |
711 | 745 | y = Translate.invY(e.getX(), e.getY(), OrangePool.getSizeS() / 2, w, h); |
712 | 746 | if (x >= 0 && x <= Terrarium.MAX_X && y >= 0 && y <= Terrarium.MAX_Y) { |
713 | - ObjEX.Direction dir; | |
747 | + OrangePool.PoolType type; | |
714 | 748 | switch (s2.getSelectedIndex()) { |
715 | - case BACK: | |
749 | + case 0: | |
716 | 750 | default: |
717 | - dir = ObjEX.Direction.BACK; | |
751 | + type = OrangePool.PoolType.NORMAL; | |
718 | 752 | break; |
719 | - case THISSIDE: | |
720 | - dir = ObjEX.Direction.THISSIDE; | |
753 | + case 1: | |
754 | + type = OrangePool.PoolType.RESCUE; | |
721 | 755 | break; |
722 | - case RIGHT: | |
723 | - dir = ObjEX.Direction.BACK; | |
724 | - break; | |
725 | - case LEFT: | |
726 | - dir = ObjEX.Direction.BACK; | |
727 | - break; | |
728 | 756 | } |
729 | - mypane.terrarium.buyObjEx(ORANGEPOOL, x, y, dir); | |
757 | + mypane.terrarium.buyObjEx(ORANGEPOOL, x, y, type); | |
730 | 758 | } |
731 | 759 | break; |
732 | 760 | case PRODUCTCHUTE: |
@@ -733,7 +761,7 @@ | ||
733 | 761 | x = Translate.invX(e.getX(), e.getY(), ProductChute.getSizeS(), w, h); |
734 | 762 | y = Translate.invY(e.getX(), e.getY(), ProductChute.getSizeS() / 2, w, h); |
735 | 763 | if (x >= 0 && x <= Terrarium.MAX_X && y >= 0 && y <= Terrarium.MAX_Y) { |
736 | - mypane.terrarium.buyObjEx(PRODUCTCHUTE, x, y, ObjEX.Direction.BACK); | |
764 | + mypane.terrarium.buyObjEx(PRODUCTCHUTE, x, y, null); | |
737 | 765 | } |
738 | 766 | break; |
739 | 767 | case BARRIER: |