赞 | 0 |
VIP | 0 |
好人卡 | 2 |
积分 | 1 |
经验 | 9731 |
最后登录 | 2015-2-24 |
在线时间 | 329 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 329 小时
- 注册时间
- 2011-7-14
- 帖子
- 50
|
3楼
楼主 |
发表于 2012-2-13 13:44:35
|
只看该作者
- #==============================================================================
- # Game_System
- #------------------------------------------------------------------------------
- # 添加内容
- #==============================================================================
- class Game_System
- attr_accessor :mission #现在执行的任务
- attr_accessor :partmission
- alias carol3_ini initialize
- def initialize
- carol3_ini
- @mission = ""
- @partmission = []
- end
- end
- #==============================================================================
- # ■ Scene_Title
- #------------------------------------------------------------------------------
- # 处理标题画面的类。
- #==============================================================================
- class Scene_Title
- alias carol3_title1 main
- def main
- $map_infos = load_data("Data/MapInfos.rxdata")
- for key in $map_infos.keys
- $map_infos[key] = $map_infos[key].name
- end
- $任务 = ""
- $支线 = nil
- $支线完成 = nil
- carol3_title1
- end
- end
- class Scene_Map
- alias carol3_update update
- def update
- carol3_update
- if $支线 != nil
- for i in 0...$game_system.partmission.size
- if $game_system.partmission[i] == $支线
- $支线 = nil
- break
- end
- end
- if $支线 != nil
- $game_system.partmission.push($支线)
- $支线 = nil
- end
- end
- if $支线完成 != nil
- for i in 0...$game_system.partmission.size
- if $game_system.partmission[i] == $支线完成
- $game_system.partmission.delete($game_system.partmission[i])
- break
- end
- end
- $支线完成 = nil
- end
- end
- end
- #==============================================================================
- # ■ Game_Map
- #------------------------------------------------------------------------------
- # 处理地图的类。包含卷动以及可以通行的判断功能。
- # 本类的实例请参考 $game_map 。
- #==============================================================================
- class Game_Map
- def name
- return $map_infos[@map_id]
- end
- end
- #==============================================================================
- # Window_RecordBook
- #------------------------------------------------------------------------------
- # 菜单界面表示信息的窗口
- #==============================================================================
- class Window_RecordBook < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对象
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 640, 480)
- self.contents = Bitmap.new(width - 32, height - 32)
- if $任务 == ""
- $任务 = $game_system.mission
- else
- $game_system.mission = $任务
- end
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- self.contents.font.color = system_color
- self.contents.font.size = 20
- cx = self.contents.text_size("现在地点").width + 24
- self.contents.draw_text(4, 0, cx, 24, "现在地点")
- self.contents.font.color = normal_color
- self.contents.draw_text(4 + cx, 0, 444 - cx, 24, $game_map.name.to_s)
- self.contents.font.color = system_color
- cx = self.contents.text_size("主线任务").width + 24
- self.contents.draw_text(4, 32, cx, 24, "主线任务")
- self.contents.font.color = Color.new(240,250,75,255)
- self.contents.draw_text(4 + cx, 32, 444 - cx, 24, $game_system.mission.to_s)
- self.contents.font.color = system_color
- cx = self.contents.text_size("支线任务").width + 24
- self.contents.draw_text(4, 96, cx, 24, "支线任务")
- self.contents.font.color = normal_color
- for i in 0...$game_system.partmission.size
- self.contents.draw_text(4 + cx, 96 + i * 32, 444 - cx, 24, $game_system.partmission[i].to_s)
- end
- end
- end
- #----------------------------------------------------------------------------
- # ● 任务书调用场景!调用方法:$scene=Scene_RecordBook.new
- #----------------------------------------------------------------------------
- class Scene_RecordBook
- def main
- @command_window = Window_RecordBook.new
- Graphics.transition
- loop do
- Graphics.update
- Input.update
- update
- if $scene != self
- break
- end
- end
- Graphics.freeze
- @command_window.dispose
- if $scene.is_a?(Scene_Title)
- Graphics.transition
- Graphics.freeze
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- def update
- @command_window.update
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- $scene = Scene_Map.new
- return
- end
- end
- end
复制代码
‘‘
然后就是什么都没有
──panhengyi123于2012-2-13 13:44补充以上内容’’
‘‘
不会用饿。。。。郁闷这是原网址http://www.66rpg.com/articles/3203
──panhengyi123于2012-2-13 13:45补充以上内容’’ |
|