赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 1475 |
最后登录 | 2014-6-20 |
在线时间 | 20 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 20 小时
- 注册时间
- 2013-10-4
- 帖子
- 14
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
我在PC版黄金FINAL的脚本里看到的
代码如下:
class Scene_Begin
CREDIT=<<_b_
**英雄坛说**
_b_
end
class Scene_Begin
def initialize(return_scene = nil)
@sprite = Sprite.new
@sprite.bitmap = Bitmap.new("Graphics/Pictures/blank.png")
@sprite.x = 0
@sprite.y = 0
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_bitmap.clear
@credit_sprite.dispose
@credit_bitmap.dispose
@sprite.dispose
end
def last?
return (@frame_index >= @credit_sprite.bitmap.height + 480)
end
def last
if not @last_flag
Audio.bgm_fade(3000)
@last_flag = true
@last_count = 0
else
@last_count += 1
end
if @last_count >= 15
command_new_game
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 = Scene_Create.new
return true
end
return false
end
def main
scene_start
Audio.bgm_play("Audio/bgm/begin.mp3")
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
scene_end
command_new_game
end
end
def command_new_game
Audio.bgm_stop
Graphics.frame_count = 0
$game_temp = Game_Temp.new
$game_system = Game_System.new
$game_switches = Game_Switches.new
$game_variables = Game_Variables.new
$game_self_switches = Game_SelfSwitches.new
$game_screen = Game_Screen.new
$game_actors = Game_Actors.new
$game_party = Game_Party.new
$game_troop = Game_Troop.new
$game_map = Game_Map.new
$game_player = Game_Player.new
# 设置初期同伴位置
$game_party.setup_starting_members
# 设置初期位置的地图
$game_map.setup($data_system.start_map_id)
# 主角向初期位置移动
$game_player.moveto($data_system.start_x, $data_system.start_y)
# 刷新主角
$game_player.refresh
# 执行地图设置的 BGM 与 BGS 的自动切换
$game_map.autoplay
# 刷新地图 (执行并行事件)
$game_map.update
# 切换创建角色画面
$scene = Scene_Create.new
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
这个脚本的作用是在游戏的开始打出移动字幕,但是开头的CREDIT=<<_b_
不懂是什么意思,=<<符号到底是干嘛的 |
|