赞 | 38 |
VIP | 2420 |
好人卡 | 100 |
积分 | 33 |
经验 | 75384 |
最后登录 | 2025-1-3 |
在线时间 | 3620 小时 |
Lv3.寻梦者 (暗夜天使) 名侦探小柯
- 梦石
- 0
- 星屑
- 3309
- 在线时间
- 3620 小时
- 注册时间
- 2006-9-6
- 帖子
- 37400
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
- #===============================================================================
- #本脚本所有权归小柯一人所有 除非共享该脚本 否则不得善自修改使用 66RPG #
- #===============================================================================
- class Game_Player < Game_Character
- #--------------------------------------------------------------------------
- # ● 增加步数
- #--------------------------------------------------------------------------
- def increase_steps
- super
- # 不是强制移动路线的场合
- unless @move_route_forcing
- # 增加步数
- $game_variables[5] += 1
- # 步数是偶数的情况下
- if $game_party.steps % 2 == 0
- # 检查连续伤害
- $game_party.check_map_slip_damage
- end
- end
- end
- end
- #==============================================================================
- # ■ Window_PlayTime
- #------------------------------------------------------------------------------
- # 菜单画面显示游戏时间的窗口。
- #==============================================================================
- class Window_Time < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 180, 60)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.z = 110
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- self.contents.font.color = system_color
- self.contents.draw_text(0, 0, 140, 32, "时间",2)
- self.contents.font.color = normal_color
- time1 = [$game_variables[6],23].min
- time2 = [$game_variables[7],59].min
- self.contents.draw_text(-24, 0, 60, 32,time1.to_s,2)
- self.contents.draw_text(-24, 0, 100, 32,time2.to_s,2)
- self.contents.draw_text(-24, 0, 80, 32,":",2)
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- def update
- super
- if Graphics.frame_count / Graphics.frame_rate != @total_sec
- refresh
- end
- end
- end
- #==============================================================================
- # ■ Window_MenuStatus
- #------------------------------------------------------------------------------
- # 显示菜单画面和同伴状态的窗口。
- #==============================================================================
- $MT=200
- $MP=200
- class Window_MenuStatus < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 初始化目标
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 420, 420)
- self.contents = Bitmap.new(width - 32, height - 32)
- refresh
- self.active = false
- self.index = -1
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.actors.size
- for i in 0...$game_party.actors.size
- actor = $game_party.actors[i]
- bitmap=Bitmap.new("Graphics/Pictures/face")
- src_rect = Rect.new(0, 0, 100, 100) #——可自己调整大小
- self.contents.blt(0, y, bitmap, src_rect)
- self.contents.font.color = normal_color
- self.contents.draw_text(60, 120,50,32,$game_variables[1].to_s,2)
- self.contents.draw_text(60, 150,50,32,$game_variables[3].to_s,2)
- self.contents.draw_text(60,120,100,32,$MT.to_s,2)
- self.contents.draw_text(60,150,100,32,$MP.to_s,2)
- self.contents.draw_text(80, 200, 120, 32, $game_party.gold.to_s, 2)
- self.contents.draw_text(80, 240, 120, 32, $game_variables[8].to_s, 2)
- self.contents.draw_text(80, 300, 120, 32, $game_variables[5].to_s , 2)
- self.contents.font.color = system_color
- self.contents.draw_text(0, 120, 120, 32, "体力:", 3)
- self.contents.draw_text(20 + 96,120,100,32,"/",0)
- self.contents.draw_text(0, 150, 100, 32, "疲劳:", 3)
- self.contents.draw_text(20 + 96,150,100,32,"/",0)
- self.contents.draw_text(0, 200, 100, 32, "金钱:", 3)
- self.contents.draw_text(0, 250, 100, 32, "赌博币:", 3)
- self.contents.draw_text(0, 300, 120, 32, "步数")
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新光标矩形
- #--------------------------------------------------------------------------
- def update_cursor_rect
- if @index < 0
- self.cursor_rect.empty
- else
- self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
- end
- end
- end
- #==============================================================================
- # ■ Scene_Menu
- #------------------------------------------------------------------------------
- # 处理菜单画面的类。
- #==============================================================================
- class Scene_Menu
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # menu_index : 命令光标的初期位置
- #--------------------------------------------------------------------------
- def initialize(menu_index = 0)
- @menu_index = menu_index
- end
- #--------------------------------------------------------------------------
- # ● 主处理
- #--------------------------------------------------------------------------
- def main
- # 生成命令窗口
- s1 = "物品"
- s2 = "装备"
- s3 = "写日记"
- s4 = "离开菜单"
- @command_window = Window_Command.new(160, [s1, s2, s3, s4])
- @command_window.index = @menu_index
- @command_window.opacity = 0
- @command_window.x = 290
- @command_window.y = 50
- # 同伴人数为 0 的情况下
- if $game_party.actors.size == 0
- # 物品、特技、装备、状态无效化
- @command_window.disable_item(0)
- @command_window.disable_item(1)
- @command_window.disable_item(2)
- @command_window.disable_item(3)
- end
- # 禁止存档的情况下
- if $game_system.save_disabled
- # 存档无效
- @command_window.disable_item(2)
- end
- @steps = $game_variables[5]
- # 生成游戏时间窗口
- @playtime_window = Window_Time.new
- @playtime_window.x = 460
- @playtime_window.y = 0
- # 生成状态窗口
- @status_window = Window_MenuStatus.new
- @status_window.x = 50
- @status_window.y = 30
- # 执行过渡
- Graphics.transition
- # 主循环
- loop do
- # 刷新游戏画面
- Graphics.update
- # 刷新输入信息
- Input.update
- # 刷新画面
- update
- # 如果切换画面就中断循环
- if $scene != self
- break
- end
- end
- # 准备过渡
- Graphics.freeze
- # 释放窗口
- @command_window.dispose
- @playtime_window.dispose
- @status_window.dispose
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- def update
- # 刷新窗口
- @command_window.update
- @playtime_window.update
- @status_window.update
- # 命令窗口被激活的情况下: 调用 update_command
- if @command_window.active
- update_command
- return
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面 (命令窗口被激活的情况下)
- #--------------------------------------------------------------------------
- def update_command
- # 按下 B 键的情况下
- if Input.trigger?(Input::B)
- # 演奏取消 SE
- $game_system.se_play($data_system.cancel_se)
- # 切换的地图画面
- $scene = Scene_Map.new
- return
- end
- # 按下 C 键的情况下
- if Input.trigger?(Input::C)
- # 同伴人数为 0、存档、游戏结束以外的场合
- if $game_party.actors.size == 0 and @command_window.index < 4
- # 演奏冻结 SE
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- # 命令窗口的光标位置分支
- case @command_window.index
- when 0 # 物品
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- # 切换到物品画面
- $scene = Scene_Item.new
- when 1 # 装备
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- # 激活状态窗口
- @command_window.active = false
- $scene = Scene_Equip.new
- when 2 # 存档
- # 禁止存档的情况下
- if $game_system.save_disabled
- # 演奏冻结 SE
- $game_system.se_play($data_system.buzzer_se)
- return
- end
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- # 切换到存档画面
- $scene = Scene_Save.new
- when 3 # 状态
- # 演奏确定 SE
- $game_system.se_play($data_system.decision_se)
- $scene=Scene_End.new
- end
- return
- end
- end
- end
- #===============================================================================
- #本脚本所有权归小柯一人所有 除非共享该脚本 否则不得善自修改使用 66RPG #
- #===============================================================================
复制代码
就是这个脚本,
如何做到里面的那个时间框显示出来后就不消失,
一直显示着?
[LINE]1,#dddddd[/LINE]
就是说菜单没了也继续显示,
但是得先打开菜单 |
|