#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
# 处理电脑画面的类。
#==============================================================================
class Scene_电脑
#--------------------------------------------------------------------------
# ● 初始化对像
# menu_index : 命令光标的初期位置
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# ● 主处理
#--------------------------------------------------------------------------
def main
# 生成活动块
@spriteset = Spriteset_Map.new
# 生成命令窗口
s1 = "了解游戏"
s2 = "领取赏金"
s3 = "访问贴吧"
s4 = "访问qq群"
s5 = "访问论坛"
s6 = "关闭电脑"
@command_window = Window_Command.new(200, [s1,s2,s3,s4,s5,s6],2)
@command_window.index = @menu_index
# 执行过渡
Graphics.transition
# 主循环
loop do
# 刷新游戏画面
Graphics.update
# 刷新输入信息
Input.update
# 如果切换画面就中断循环
if $scene != self
break
end
end
# 准备过渡
Graphics.freeze
# 准备过渡
Graphics.freeze
#--------------------------------------------------------------------------
# ● 刷新画面 (命令窗口被激活的情况下)
#--------------------------------------------------------------------------
def 电脑刷新
# 命令窗口的光标位置分支
case @command_window.index
when 0 # 了解游戏
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
$game_temp.common_event_id = 3
$scene = Scene_电脑.new
when 1 # 领取赏金
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
$game_temp.message_text = "抱歉,您未击败过赏金怪物!"
$scene = Scene_电脑.new
when 2 # 访问贴吧
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
share = Win32API.new('shell32.dll', 'ShellExecuteA', 'pppppi', 'i')
share.call(0, 'open', "http://tieba.baidu.com/f?kw=mm%B7%E7%D4%C6%D4%D9%C6%F0", 0, 0, 1)
$scene = Scene_电脑.new
when 3 # 访问qq群
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
share = Win32API.new('shell32.dll', 'ShellExecuteA', 'pppppi', 'i')
share.call(0, 'open', "http://jq.qq.com/?_wv=1027&k=Jhzmcm", 0, 0, 1)
$scene = Scene_电脑.new
when 4 # 访问论坛
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
share = Win32API.new('shell32.dll', 'ShellExecuteA', 'pppppi', 'i')
share.call(0, 'open', "http://bbs.rgss.cn/forum-514-1.html", 0, 0, 1)
$scene = Scene_电脑.new
when 5 # 关闭电脑
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
$game_switches[4] = false
$scene = Scene_电脑.new
end
return
end
end
end