赞 | 274 |
VIP | 0 |
好人卡 | 3 |
积分 | 496 |
经验 | 40966 |
最后登录 | 2024-9-22 |
在线时间 | 1920 小时 |
Lv5.捕梦者
- 梦石
- 10
- 星屑
- 39587
- 在线时间
- 1920 小时
- 注册时间
- 2010-11-14
- 帖子
- 3320
|
本帖最后由 KB.Driver 于 2019-5-24 17:58 编辑
2、放大倍率的变化
back_sprite = Sprite.new
back_bitmap = Bitmap.new("Graphics/Parallaxes/Mountains1")
back_sprite.bitmap = back_bitmap
sprite1 = Sprite.new
sprite1.bitmap = Bitmap.new("Graphics/Battlers/Slime")
sprite1_desc = Sprite.new
sprite1_desc.bitmap = Bitmap.new(300, 26)
sprite1_desc.bitmap.draw_text(0,0,300,26,"sprite1.zoom_x += 0.02")
sprite2 = Sprite.new
sprite2.bitmap = Bitmap.new("Graphics/Battlers/Slime")
sprite2.x = 280
sprite2_desc = Sprite.new
sprite2_desc.bitmap = Bitmap.new(300, 26)
sprite2_desc.bitmap.draw_text(0,0,300,26,"sprite2.zoom_y += 0.02")
sprite2_desc.x = 280
frames = 0
speed = 0.02
rate = 1
# 循环更新画面
loop do
if frames > 29
rate *= -1
frames = 0
end
sprite1.zoom_x += speed * rate
sprite2.zoom_y += speed * rate
frames += 1
# 画面的更新
Graphics.update
end
|
|