上次使用脚本写了一个精灵动画的列子,感觉速度还可以,这里保存了几个截图,大家看看:
还看来,用他编一个情景对话是没有任何问题的啦~
FireScript的脚本:
理所当然我们在控制台还是能够直接控制精灵动画的,是不是很棒,哈哈~
还看来,用他编一个情景对话是没有任何问题的啦~
FireScript的脚本:
1using System.Threading
2using System.Drawing
3
4//一个精灵对象
5s= f.Add("renwu\\NPC-B01.bmp",new Point(3,4))
6
7
8
9s2= f.Add("renwu\\NPC-B02.bmp",new Point(3,4))
10s2.MoveX(30)
11
12
13 s3= f.Add("renwu\\NPC-B03.bmp",new Point(3,4))
14s3.MoveX(60)
15
16 s4= f.Add("renwu\\NPC-B04.bmp",new Point(3,4))
17s4.MoveX(90)
18
19 s5= f.Add("renwu\\NPC-B05.bmp",new Point(3,4))
20s5.MoveX(120)
21
22 s6= f.Add("renwu\\NPC-B06.bmp",new Point(3,4))
23s6.MoveX(150)
24
25 s7= f.Add("renwu\\NPC-G01.bmp",new Point(3,4))
26s7.MoveX(180)
27
28sleep = 200
29
30i=0
31m=new System.EventHandler(haha)
32function haha()
33{
34
35 s6.PlayNext()
36 s7.PlayNext()
37
38
39 s3.PlayNext()
40
41 s4.PlayNext()
42
43 s5.PlayNext()
44
45
46
47
48 s2.PlayNext()
49 s.PlayNext()
50 f.Refresh()
51}
52os = new System.Object[0]
53
54t = new Thread(new ThreadStart(xixi))
55t.Start()
56function xixi()
57{
58 while(true)
59 {
60 f.Invoke(m,os)
61 Thread.Sleep(sleep)
62 }
63 }
64
65
66
2using System.Drawing
3
4//一个精灵对象
5s= f.Add("renwu\\NPC-B01.bmp",new Point(3,4))
6
7
8
9s2= f.Add("renwu\\NPC-B02.bmp",new Point(3,4))
10s2.MoveX(30)
11
12
13 s3= f.Add("renwu\\NPC-B03.bmp",new Point(3,4))
14s3.MoveX(60)
15
16 s4= f.Add("renwu\\NPC-B04.bmp",new Point(3,4))
17s4.MoveX(90)
18
19 s5= f.Add("renwu\\NPC-B05.bmp",new Point(3,4))
20s5.MoveX(120)
21
22 s6= f.Add("renwu\\NPC-B06.bmp",new Point(3,4))
23s6.MoveX(150)
24
25 s7= f.Add("renwu\\NPC-G01.bmp",new Point(3,4))
26s7.MoveX(180)
27
28sleep = 200
29
30i=0
31m=new System.EventHandler(haha)
32function haha()
33{
34
35 s6.PlayNext()
36 s7.PlayNext()
37
38
39 s3.PlayNext()
40
41 s4.PlayNext()
42
43 s5.PlayNext()
44
45
46
47
48 s2.PlayNext()
49 s.PlayNext()
50 f.Refresh()
51}
52os = new System.Object[0]
53
54t = new Thread(new ThreadStart(xixi))
55t.Start()
56function xixi()
57{
58 while(true)
59 {
60 f.Invoke(m,os)
61 Thread.Sleep(sleep)
62 }
63 }
64
65
66
理所当然我们在控制台还是能够直接控制精灵动画的,是不是很棒,哈哈~