def initialize(return_scene = nil)
@sprite = Sprite.new
@sprite.bitmap = Bitmap.new("Graphics/Pictures/")
@sprite.x = 0
@sprite.y = 0
if return_scene.nil?
return_scene = Scene_Map.new
end
@return_scene = return_scene
end
def scene_start
credit_lines = CREDIT.split(/\n/)
credit_bitmap = Bitmap.new(640,32 * credit_lines.size)
credit_lines.each_index do |i|
line = credit_lines[i]
credit_bitmap.draw_text(0,i * 32,640,32,line,1)
end
@credit_sprite = Sprite.new(Viewport.new(0,50,640,380))
@credit_sprite.bitmap = credit_bitmap
@credit_sprite.oy = -430
@frame_index = 0
@last_flag = false
end
def scene_end
@credit_sprite.dispose
@sprite.dispose
end
def last?
return (@frame_index >= @credit_sprite.bitmap.height + 480)
end
def last
if not @last_flag
Audio.bgm_fade(10000)
@last_flag = true
@last_count = 0
else
@last_count += 1
end
if @last_count >= 300
$scene = @return_scene
end
end
def update
@frame_index += 1
return if cancel?
last if last?
@credit_sprite.oy += 1
end
def cancel?
if Input.trigger?(Input::B)
$scene = @return_scene
return true
end
return false
end
def main
scene_start
# 过渡
Graphics.transition
# 主循环
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
# 准备过渡
Graphics.freeze
scene_end
end
end 作者: 越前リョーマ 时间: 2011-7-15 16:28
把字幕做成一个很长很长的图片,然后显示图片(Y坐标为负值,和图片高度一样),然后移动图片。作者: №独孤剑→ 时间: 2011-7-15 19:48
# ————————————————————————————————————
# 本脚本来自www.66rpg.com,转载请保留此信息
# ————————————————————————————————————
def initialize(return_scene = nil)
if return_scene.nil?
return_scene = Scene_Title.new
end
@return_scene = return_scene
end
def scene_start
credit_lines = CREDIT.split(/\n/)
credit_bitmap = Bitmap.new(640,32 * credit_lines.size)
credit_lines.each_index do |i|
line = credit_lines
credit_bitmap.draw_text(0,i * 32,640,32,line,1)
end
@credit_sprite = Sprite.new(Viewport.new(0,50,640,380))
@credit_sprite.bitmap = credit_bitmap
@credit_sprite.oy = -430
@frame_index = 0
@last_flag = false
end
def scene_end
@credit_sprite.dispose
end
def last?
return (@frame_index >= @credit_sprite.bitmap.height + 480)
end
def last
if not @last_flag
Audio.bgm_fade(10000)
@last_flag = true
@last_count = 0
else
@last_count += 1
end
if @last_count >= 300
$scene = @return_scene
end
end
def update
@frame_index += 1
return if cancel?
last if last?
@credit_sprite.oy += 1
end
def cancel?
if Input.trigger?(Input::B)
$scene = @return_scene
return true
end
return false
end
def main
scene_start
# 过渡
Graphics.transition
# 主循环
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
# 准备过渡
Graphics.freeze
scene_end
end
end 作者: cinderelmini 时间: 2011-7-15 21:51
新人的话~~
做一张要显示的东西的图片,宽度保持在640以内,
高度不限,
然后用事件-->显示图片(调好坐标)-->移动图片(设置好速度)-->测试~~