设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
12
返回列表 发新帖
楼主: 16732682
打印 上一主题 下一主题

大大们请进,关于点状态直接进入人物介绍的问题

 关闭 [复制链接]
头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2005-10-21
帖子
74
11
 楼主| 发表于 2007-7-28 03:29:00 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
431
在线时间
125 小时
注册时间
2006-11-2
帖子
1200
12
发表于 2007-7-28 03:34:44 | 只看该作者
把刚才那个地方改回来之后

$scene = Scene_Status.new(@status_window.index)



这句改成

$scene = Scene_Charactor.new(@status_window.index)

和记忆一起封存着的ID...
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2005-10-21
帖子
74
13
 楼主| 发表于 2007-7-28 03:44:00 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
431
在线时间
125 小时
注册时间
2006-11-2
帖子
1200
14
发表于 2007-7-28 03:47:24 | 只看该作者
  1. #========================================
  2. #■ Window_Base
  3. #----------------------------------------
  4. # Setting functions for the "Base"
  5. #========================================

  6. class Window_Base < Window

  7.   def draw_actor_face(actor, x, y)
  8.     face=Bitmap.new("Graphics/heads/#{actor.character_name}")
  9.     fw = face.width
  10.     fh = face.height
  11.     src_rect = Rect.new(0, 0, 200, 200)
  12.     self.contents.blt(x - fw / 23, y, face, src_rect)
  13.   end
  14.   #--------------------------------------------------------------------------
  15.   # ● 图形的描绘
  16.   #     actor : 角色
  17.   #     x     : 描画目标 X 坐标
  18.   #     y     : 描画目标 Y 坐标
  19.   #--------------------------------------------------------------------------
  20.   def draw_actor_half_graphic(actor, x, y)
  21.     bitmap = RPG::Cache.character(actor.character_name, actor.character_hue)
  22.     cw = bitmap.width / 4
  23.     ch = bitmap.height / 8
  24.     src_rect = Rect.new(0, 0, cw, ch)
  25.     self.contents.blt(x - cw / 2, y, bitmap, src_rect)
  26.   end
  27. end

  28. #========================================
  29. #■ Game_Map
  30. #----------------------------------------
  31. # Setting functions for the Map
  32. #========================================
  33. class Game_Map

  34. def name
  35. $map_infos[@map_id]
  36. end
  37. end

  38. #========================================
  39. #■ Window_Title
  40. #----------------------------------------
  41. # Setting functions for the Title
  42. #========================================
  43. class Scene_Title
  44. $map_infos = load_data("Data/MapInfos.rxdata")
  45. for key in $map_infos.keys
  46. $map_infos[key] = $map_infos[key].name
  47. end
  48. end




  49. #==============================================================================
  50. # ■ Window_MenuStatus
  51. #------------------------------------------------------------------------------
  52. #  Sets up the Choosing.
  53. #==============================================================================

  54. class Window_MenuStatus < Window_Selectable
  55. #--------------------------------------------------------------------------
  56. # Set up
  57. #--------------------------------------------------------------------------
  58. def initialize
  59.    super(0, 0, 520, 454)
  60.    self.contents = Bitmap.new(width - 32, height - 32)
  61.    self.contents.font.name = "黑体"
  62.    self.contents.font.size = 20
  63.    refresh
  64.    self.active = false
  65.    self.index = -1
  66. end

  67. #--------------------------------------------------------------------------
  68. # Update of Cursor
  69. #--------------------------------------------------------------------------
  70. def update_cursor_rect
  71.    if @index < 0
  72.      self.cursor_rect.empty
  73.    else
  74.      case @index
  75.      when 0
  76.        self.cursor_rect.set(0, 0, self.width - 32, 125)
  77.      when 1
  78.        self.cursor_rect.set(0, 130, self.width - 32, 125)
  79.      else
  80.        self.cursor_rect.set(0, 300+(@index-2)*30, self.width - 32, 30)
  81.     end
  82.    end
  83. end
  84. end
  85. #=======================================#
  86. # ■Window_GameStats                                                             #
  87. # written by AcedentProne                                                          #
  88. #------------------------------------------------------------------------------#
  89. class Window_GameStats < Window_Base
  90. def initialize
  91.   super(0, 0, 160, 140)
  92.   self.contents = Bitmap.new(width - 32, height - 32)
  93.   self.contents.font.name = "黑体"
  94.   self.contents.font.size = 18
  95.   refresh
  96. end

  97. def refresh
  98.   self.contents.clear
  99.   self.contents.font.color = system_color
  100.   # Draw "Time"
  101.   @total_sec = Graphics.frame_count / Graphics.frame_rate
  102.   hour = @total_sec / 60 / 60
  103.   min = @total_sec / 60 % 60
  104.   sec = @total_sec % 60
  105.   text = sprintf("%02d:%02d:%02d", hour, min, sec)
  106.   self.contents.font.color = normal_color
  107.   self.contents.draw_text(4, 22, 120, 32, text, 2)
  108.   self.contents.font.color = system_color
  109.   self.contents.draw_text(4, 0, 100, 32, "游戏时间")
  110.   self.contents.font.color = system_color
  111.   self.contents.draw_text(4, 60, 100, 32, "金钱")
  112.   self.contents.font.color = normal_color
  113.   self.contents.draw_text(4, 60, 120, 32,$game_party.gold.to_s, 2)
  114. end
  115. #--------------------------------------------------------------------------
  116. # Update of The count
  117. #--------------------------------------------------------------------------
  118. def update
  119.   super
  120.   if Graphics.frame_count / Graphics.frame_rate != @total_sec
  121.     refresh
  122.   end
  123. end
  124. end
  125. #==============================================================================
  126. # ■ Window_Mapname
  127. #------------------------------------------------------------------------------
  128. #  Draws the Map name
  129. #==============================================================================

  130. class Window_Mapname < Window_Base
  131. #--------------------------------------------------------------------------
  132. # Set up
  133. #--------------------------------------------------------------------------
  134. def initialize
  135. super(0, 0, 320, 60)
  136. self.contents = Bitmap.new(width - 52, height - 32)
  137. self.contents.font.name = "黑体"
  138. self.contents.font.size = 20
  139. refresh
  140. end
  141. #--------------------------------------------------------------------------
  142. # Draws info on screen
  143. #--------------------------------------------------------------------------
  144. def refresh
  145. self.contents.clear

  146. # Map Name
  147. #map = $game_map.name
  148. self.contents.font.color = system_color
  149. self.contents.draw_text(4, 0, 220, 32, "所在地点")
  150. self.contents.font.color = normal_color
  151. self.contents.draw_text(175, 0, 80, 32, $game_map.name)
  152. end
  153. end
  154. #==============================================================================
  155. # ■ Scene_Menu
  156. #------------------------------------------------------------------------------
  157. #  处理菜单画面的类。
  158. #==============================================================================

  159. class Scene_Menu
  160.   #--------------------------------------------------------------------------
  161.   # ● 初始化对像
  162.   #     menu_index : 命令光标的初期位置
  163.   #--------------------------------------------------------------------------
  164.   def initialize(menu_index = 0)
  165.     @menu_index = menu_index
  166.   end
  167.   #--------------------------------------------------------------------------
  168.   # ● 主处理
  169.   #--------------------------------------------------------------------------
  170.   def main
  171.     # 生成命令窗口
  172.     s1 = $data_system.words.item
  173.     s2 = $data_system.words.skill
  174.     s3 = $data_system.words.equip
  175.     s4 = "状态"
  176.     s5 = "存档"
  177.     s6 = "结束游戏"
  178.     @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
  179.     @command_window.index = @menu_index
  180.     # 同伴人数为 0 的情况下
  181.     if $game_party.actors.size == 0
  182.       # 物品、特技、装备、状态无效化
  183.       @command_window.disable_item(0)
  184.       @command_window.disable_item(1)
  185.       @command_window.disable_item(2)
  186.       @command_window.disable_item(3)
  187.     end
  188.     # 禁止存档的情况下
  189.     if $game_system.save_disabled
  190.       # 存档无效
  191.       @command_window.disable_item(4)
  192.     end
  193.     # 生成游戏时间窗口
  194.     @playtime_window = Window_PlayTime.new
  195.     @playtime_window.x = 0
  196.     @playtime_window.y = 224
  197.     # 生成步数窗口
  198.     @steps_window = Window_Steps.new
  199.     @steps_window.x = 0
  200.     @steps_window.y = 320
  201.     # 生成金钱窗口
  202.     @gold_window = Window_Gold.new
  203.     @gold_window.x = 0
  204.     @gold_window.y = 416
  205.     # 生成状态窗口
  206.     @status_window = Window_MenuStatus.new
  207.     @status_window.x = 160
  208.     @status_window.y = 0
  209.     # 执行过渡
  210.     Graphics.transition
  211.     # 主循环
  212.     loop do
  213.       # 刷新游戏画面
  214.       Graphics.update
  215.       # 刷新输入信息
  216.       Input.update
  217.       # 刷新画面
  218.       update
  219.       # 如果切换画面就中断循环
  220.       if $scene != self
  221.         break
  222.       end
  223.     end
  224.     # 准备过渡
  225.     Graphics.freeze
  226.     # 释放窗口
  227.     @command_window.dispose
  228.     @playtime_window.dispose
  229.     @steps_window.dispose
  230.     @gold_window.dispose
  231.     @status_window.dispose
  232.   end
  233.   #--------------------------------------------------------------------------
  234.   # ● 刷新画面
  235.   #--------------------------------------------------------------------------
  236.   def update
  237.     # 刷新窗口
  238.     @command_window.update
  239.     @playtime_window.update
  240.     @steps_window.update
  241.     @gold_window.update
  242.     @status_window.update
  243.     # 命令窗口被激活的情况下: 调用 update_command
  244.     if @command_window.active
  245.       update_command
  246.       return
  247.     end
  248.     # 状态窗口被激活的情况下: 调用 update_status
  249.     if @status_window.active
  250.       update_status
  251.       return
  252.     end
  253.   end
  254.   #--------------------------------------------------------------------------
  255.   # ● 刷新画面 (命令窗口被激活的情况下)
  256.   #--------------------------------------------------------------------------
  257.   def update_command
  258.     # 按下 B 键的情况下
  259.     if Input.trigger?(Input::B)
  260.       # 演奏取消 SE
  261.       $game_system.se_play($data_system.cancel_se)
  262.       # 切换的地图画面
  263.       $scene = Scene_Map.new
  264.       return
  265.     end
  266.     # 按下 C 键的情况下
  267.     if Input.trigger?(Input::C)
  268.       # 同伴人数为 0、存档、游戏结束以外的场合
  269.       if $game_party.actors.size == 0 and @command_window.index < 4
  270.         # 演奏冻结 SE
  271.         $game_system.se_play($data_system.buzzer_se)
  272.         return
  273.       end
  274.       # 命令窗口的光标位置分支
  275.       case @command_window.index
  276.       when 0  # 物品
  277.         # 演奏确定 SE
  278.         $game_system.se_play($data_system.decision_se)
  279.         # 切换到物品画面
  280.         $scene = Scene_Item.new
  281.       when 1  # 特技
  282.         # 演奏确定 SE
  283.         $game_system.se_play($data_system.decision_se)
  284.         # 激活状态窗口
  285.         @command_window.active = false
  286.         @status_window.active = true
  287.         @status_window.index = 0
  288.       when 2  # 装备
  289.         # 演奏确定 SE
  290.         $game_system.se_play($data_system.decision_se)
  291.         # 激活状态窗口
  292.         @command_window.active = false
  293.         @status_window.active = true
  294.         @status_window.index = 0
  295.       when 3  # 状态
  296.         # 演奏确定 SE
  297.         $game_system.se_play($data_system.decision_se)
  298.         # 激活状态窗口
  299.       
  300.         @command_window.active = false
  301.         @status_window.active = true
  302.         @status_window.index = 0
  303.       when 4  # 存档
  304.         # 禁止存档的情况下
  305.         if $game_system.save_disabled
  306.           # 演奏冻结 SE
  307.           $game_system.se_play($data_system.buzzer_se)
  308.           return
  309.         end
  310.         # 演奏确定 SE
  311.         $game_system.se_play($data_system.decision_se)
  312.         # 切换到存档画面
  313.         $scene = Scene_Save.new
  314.       when 5  # 游戏结束
  315.         # 演奏确定 SE
  316.         $game_system.se_play($data_system.decision_se)
  317.         # 切换到游戏结束画面
  318.         $scene = Scene_End.new
  319.       end
  320.       return
  321.     end
  322.   end
  323.   #--------------------------------------------------------------------------
  324.   # ● 刷新画面 (状态窗口被激活的情况下)
  325.   #--------------------------------------------------------------------------
  326.   def update_status
  327.     # 按下 B 键的情况下
  328.     if Input.trigger?(Input::B)
  329.       # 演奏取消 SE
  330.       $game_system.se_play($data_system.cancel_se)
  331.       # 激活命令窗口
  332.       @command_window.active = true
  333.       @status_window.active = false
  334.       @status_window.index = -1
  335.       return
  336.     end
  337.     # 按下 C 键的情况下
  338.     if Input.trigger?(Input::C)
  339.       # 命令窗口的光标位置分支
  340.       case @command_window.index
  341.       when 1  # 特技
  342.         # 本角色的行动限制在 2 以上的情况下
  343.         if $game_party.actors[@status_window.index].restriction >= 2
  344.           # 演奏冻结 SE
  345.           $game_system.se_play($data_system.buzzer_se)
  346.           return
  347.         end
  348.         # 演奏确定 SE
  349.         $game_system.se_play($data_system.decision_se)
  350.         # 切换到特技画面
  351.         $scene = Scene_Skill.new(@status_window.index)
  352.       when 2  # 装备
  353.         # 演奏确定 SE
  354.         $game_system.se_play($data_system.decision_se)
  355.         # 切换的装备画面
  356.         $scene = Scene_Equip.new(@status_window.index)
  357.       when 3  # 状态
  358.         # 演奏确定 SE
  359.         $game_system.se_play($data_system.decision_se)
  360.         # 切换到状态画面
  361.       #  $scene = Scene_Status.new(@status_window.index)
  362.          $scene = Scene_Charactor.new(@status_window.index)
  363.       end
  364.       return
  365.     end
  366.   end
  367. end
复制代码



算了 帮你改好了。。

话说 排版还真诡异。
系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~
和记忆一起封存着的ID...
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2005-10-21
帖子
74
15
 楼主| 发表于 2007-7-28 03:52:04 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2026-7-3 02:38

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表