root/lang/haxe/Tonyu2/Projects/toste/haxe/Test.hx @ 36070

Revision 36070, 0.5 kB (checked in by hoge1e3, 3 years ago)
Line 
1class Test extends tonyu.Actor {
2  public override function move() {
3    while(true) {
4      switch(state) {
5      case 0:
6        x=0;
7        state=1;
8      case 1:
9        if ((x<100)) {
10          state=2;
11        } else {
12          state=3;
13        }
14      case 2:
15        x=(x+1);
16        y=(y-rnd(3));
17        y=(y+2);
18        state=4;
19        return;
20      case 4:
21        state=1;
22      case 3:
23        terminateProc();
24        return;
25        default: return;
26      }
27    }
28  }
29}
Note: See TracBrowser for help on using the browser.