OSDN Git Service

Changing the design of the event
[liveml/LiveML.git] / test / test.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <liveml xmlns="http://t-denrai.net/common/liveml">
4   <scene name="scene1">
5     <event type="init">
6       <load name="image1" type="image">path/to</load>
7     </event>
8     <!-- Local Actions -->
9     <action name="1">
10       <active>actor</active>
11       <actionRef>g1</actionRef>
12     </action>
13     <action name="2">
14       <print>call[action 2]</print>
15       <actionRef>g2</actionRef>
16     </action>
17   </scene>
18
19   <!--Global Actions -->
20   <action name="g1">
21     <print>call[global action 1]</print>
22     <actionRef>2</actionRef>
23   </action>
24   <action name="g2">
25     <print>call[global action 2]</print>
26   </action>
27
28   <actor name="actor">
29     <event type="init">
30       <print>call[init]</print>
31     </event>
32     <event type="release">
33       <print>call[release]</print>
34     </event>
35     <action name="action">
36       <val name="a">10</val>
37       <repeat count="$a">
38         <print>roop[actor]</print>
39         <wait>1</wait>
40       </repeat>
41     </action>
42   </actor>
43
44 <!--
45   <actor type="spritebox" name="actor1">
46     <event type="init">
47       <image>image1</image>
48       <pos name="x" type="absolute">0</pos>
49       <pos name="y" type="absolute">0</pos>
50       <pos name="z" type="absolute">0</pos>
51       <scale name="x" type="absolute">1</scale>
52       <scale name="y" type="absolute">1</scale>
53       <create type="actor" relation="child" src="render1"></create>
54       <width type="absolute">100</width>
55       <height type="absolute">100</height>
56     </event>
57     <event type="focus-on">
58     </event>
59     <event type="focus-off">
60     </event>
61     <action name="action1">
62       <print>actor1 action1</print>
63     </action>
64     <action name="action2">
65       <repeat count="5">
66         <wait>1</wait>
67       </repeat>
68     </action>
69   </actor>
70
71   <actor type="render" name="render1">
72     <event type="init">
73       <vertex name="x" id="0" type="absolute">0</vertex>
74       <vertex name="y" id="0" type="absolute">0</vertex>
75       <color name="r" type="absolute">255</color>
76       <color name="g" type="absolute">255</color>
77       <color name="b" type="absolute">255</color>
78     </event>
79     <action name="action">
80       <render type="2d" />
81     </action>
82   </actor>
83 -->
84 </liveml>