赞 | 0 |
VIP | 3 |
好人卡 | 0 |
积分 | 3 |
经验 | 3830 |
最后登录 | 2016-4-14 |
在线时间 | 24 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 260
- 在线时间
- 24 小时
- 注册时间
- 2008-8-2
- 帖子
- 128
|
用我的吧,我刚写的。- #before title
- @word1 = Sprite.new
- @word1.opacity = 0
- @word2 = Sprite.new
- @word2.opacity = 0
- # 请把图片"title_bk"和"title_front"(拓展名任意)置于system文件夹内。
- @word1.bitmap = Cache.system("title_bk")
- @word2.bitmap = Cache.system("title_front")
- #++++++++++++++++++在此设置时间++++++++++++++++++
- # 背景亮起过渡时间
- bk_time_to = 60
- # 前面LOGO亮起过渡时间
- front_time_to = 60
- # 亮起持续时间
- time_as = 80
- # 前面LOGO消逝时间
- front_time_ed = 40
- # 背景消逝时间(为0时和LOGO同时消失)
- bk_time_ed = 20
- #++++++++++++++++++++++++++++++++++++++++++++++++
- for i in 0...bk_time_to
- @word1.opacity += (256.0 / bk_time_to).ceil
- Graphics.update
- end
- for i in 0...front_time_to
- @word2.opacity += (256.0 / front_time_to).ceil
- Graphics.update
- end
- for i in 0...time_as
- Graphics.update
- end
- if bk_time_ed != 0
- for i in 0...front_time_ed
- Graphics.update
- @word2.opacity -= (256.0 / front_time_ed).ceil
- end
- for i in 0...bk_time_ed
- Graphics.update
- @word1.opacity -= (256.0 / front_time_ed).ceil
- end
- else
- for i in 0...front_time_ed
- @word1.opacity -= (256.0 / front_time_ed).ceil
- @word2.opacity -= (256.0 / front_time_ed).ceil
- Graphics.update
- end
- end
- for i in 0...20
- Graphics.update
- end
- @word1.dispose
- @word2.dispose
复制代码 |
评分
-
查看全部评分
|