グラマー作成中
@@ -18,9 +18,13 @@ | ||
18 | 18 | private static final Map<String, Integer> MOVE_FREQUENCY; |
19 | 19 | private static final Map<String, Integer> MOVE_SPEED; |
20 | 20 | private static final Map<String, Integer> MOVE_TYPE; |
21 | + private static final Map<String, Integer> EVENT_MESSAGE_BACKGROUND; | |
22 | + private static final Map<String, Integer> EVENT_MESSAGE_POSITION; | |
21 | 23 | |
22 | 24 | private static final int MOVE_FREQUENCY_DEFAULT = 3; |
23 | - private static final int MOVE_SPEED_DEFAULT = 4; | |
25 | + private static final int MOVE_SPEED_DEFAULT = 4; | |
26 | + private static final int EVENT_MESSAGE_BACKGROUND_DEFAULT = 0; | |
27 | + private static final int EVENT_MESSAGE_POSITION_DEFAULT = 0; | |
24 | 28 | |
25 | 29 | static { |
26 | 30 | DIRECTION = new HashMap<String, Integer>(); |
@@ -61,6 +65,16 @@ | ||
61 | 65 | MOVE_TYPE.put("ランダム", 1); |
62 | 66 | MOVE_TYPE.put("近づく", 2); |
63 | 67 | MOVE_TYPE.put("カスタム", 3); |
68 | + | |
69 | + EVENT_MESSAGE_BACKGROUND = new HashMap<String, Integer>(); | |
70 | + EVENT_MESSAGE_BACKGROUND.put("通常", 0); | |
71 | + EVENT_MESSAGE_BACKGROUND.put("暗い", 1); | |
72 | + EVENT_MESSAGE_BACKGROUND.put("透明", 2); | |
73 | + | |
74 | + EVENT_MESSAGE_POSITION = new HashMap<String, Integer>(); | |
75 | + EVENT_MESSAGE_POSITION.put("上", 0); | |
76 | + EVENT_MESSAGE_POSITION.put("中", 1); | |
77 | + EVENT_MESSAGE_POSITION.put("下", 2); | |
64 | 78 | } |
65 | 79 | |
66 | 80 | int directionNum(String dir) { |
@@ -90,7 +104,19 @@ | ||
90 | 104 | int moveTypeNum(MoveType it) { |
91 | 105 | return MOVE_TYPE.get(it.getValue()); |
92 | 106 | } |
107 | + | |
108 | + int backgroundNum(String it) { | |
109 | + if (it == null) | |
110 | + return EVENT_MESSAGE_BACKGROUND_DEFAULT; | |
111 | + return EVENT_MESSAGE_BACKGROUND.get(it); | |
112 | + } | |
93 | 113 | |
114 | + int positionNum(String it) { | |
115 | + if (it == null) | |
116 | + return EVENT_MESSAGE_POSITION_DEFAULT; | |
117 | + return EVENT_MESSAGE_POSITION.get(it); | |
118 | + } | |
119 | + | |
94 | 120 | boolean walkAnimeValue(String str) { |
95 | 121 | return "歩行アニメあり".equals(str); |
96 | 122 | } |