1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
package tsukuba_bunko.peko.scenario.util; |
10 |
|
|
11 |
|
import org.xml.sax.Attributes; |
12 |
|
|
13 |
|
import tsukuba_bunko.peko.scenario.ElementHandler; |
14 |
|
import tsukuba_bunko.peko.scenario.PSMLUtil; |
15 |
|
import tsukuba_bunko.peko.scenario.NextSceneMapping; |
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
0 |
public class SceneFlowHandler extends ElementHandler { |
23 |
|
|
24 |
|
|
25 |
|
public void endDocument() |
26 |
|
{ |
27 |
0 |
setEndOfScene( true ); |
28 |
0 |
} |
29 |
|
|
30 |
|
public void startElement( String namespaceURI, String localName, String qName, Attributes attrs ) |
31 |
|
{ |
32 |
0 |
String nextSceneName = PSMLUtil.getAttributeValue( attrs, "next-scene" ); |
33 |
0 |
if( nextSceneName != null ) { |
34 |
0 |
nextSceneName = nextSceneName.trim(); |
35 |
0 |
if( nextSceneName.length() > 0 ) { |
36 |
0 |
NextSceneMapping mapping = new NextSceneMapping(); |
37 |
0 |
mapping.setDefaultSceneMapping( nextSceneName ); |
38 |
0 |
getSceneContext().setNextSceneMapping( mapping ); |
39 |
|
} |
40 |
|
} |
41 |
0 |
} |
42 |
|
} |