赞 | 13 |
VIP | 320 |
好人卡 | 64 |
积分 | 3 |
经验 | 112963 |
最后登录 | 2022-8-25 |
在线时间 | 2355 小时 |
Lv2.观梦者 (暗夜天使)
- 梦石
- 0
- 星屑
- 266
- 在线时间
- 2355 小时
- 注册时间
- 2009-3-13
- 帖子
- 2309
|
- # 说明:在地图备注里加入<ShowGold>可以在该地图显示金钱。
- #==============================================================================
- # ■ Scene_Map
- #==============================================================================
- class Scene_Map
-
- alias old_create_all_windows create_all_windows
- def create_all_windows
- old_create_all_windows
- creat_gold_window
- @gold_window.open if show_gold_window?
- end
-
- alias old_pre_transfer pre_transfer
- def pre_transfer
- @gold_window.close
- old_pre_transfer
- end
-
- alias old_post_transfer post_transfer
- def post_transfer
- old_post_transfer
- @gold_window.open if show_gold_window?
- end
- #--------------------------------------------------------------------------
- # ● 创建金钱窗口,跟默认菜单中的一样
- #--------------------------------------------------------------------------
- def creat_gold_window
- @gold_window = Window_Map_Gold.new
- @gold_window.x = 0
- @gold_window.y = Graphics.height - @gold_window.height
- end
-
- def show_gold_window?
- map = load_data(sprintf("Data/Map%03d.rvdata2", $game_map.map_id))
- map.note.each_line do |line|
- return true if line.include?("<ShowGold>")
- end
- return false
- end
-
- alias old_update update
- def update
- old_update
- @gold_window.refresh if show_gold_window?
- end
-
- end
- #==============================================================================
- # ■ Window_Map_Gold
- #==============================================================================
- class Window_Map_Gold < Window_Gold
-
- def initialize
- super
- self.opacity = 0;self.contents_opacity = 0
- end
-
- def open
- self.opacity = 255;self.contents_opacity = 255
- super
- end
-
- def close
- self.opacity = 0;self.contents_opacity = 0
- end
- end
复制代码 |
|