好文档就是一把金锄头!
欢迎来到金锄头文库![会员中心]
电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本

RPG_Maker_XP脚本显示小地图.doc

7页
  • 卖家[上传人]:cl****1
  • 文档编号:443691824
  • 上传时间:2023-10-20
  • 文档格式:DOC
  • 文档大小:54KB
  • / 7 举报 版权申诉 马上下载
  • 文本预览
  • 下载提示
  • 常见问题
    • 本脚本来自www.66RPG.com,使用和转载请保留此信息#============================================================================== #==============================================================================# ■ 縮小地图的表示(ver 0.999)# by ピニョン clum-sea#==============================================================================#==============================================================================# □ 前期定义#==============================================================================module PLAN_Map_Window WIN_X = 0 # 地图的 X 座標 WIN_Y =0 # 地图的 Y 座標 WIN_WIDTH = 8*32 # 地图的宽度 WIN_HEIGHT = 6*32 # 地图的高度 ZOOM = 4 # 地图的放缩比例 WINDOWSKIN = "" # 自定义地图窗口素材,如果留空则是默认的 ON_OFF_KEY = Input::A # 打开地图的按钮,A就是键盘的Z键 SWITCH = 99 # 禁用地图功能的开关,默认这个就是打开100号开关则禁止 # 使用地图功能,关闭则可以使用地图功能 WINDOW_MOVE = false # 窗口中的地图跟随移动,(true:跟随, false:固定) OVER_X = 632 - WIN_WIDTH # 移動后的 X 座標(初期位置と往復します) OVER_Y = 8 # 移動后的 Y 座標(初期位置と往復します) OPACITY = 50 # 窗口的透明度 C_OPACITY = 200 # 地图的透明度 VISIBLE = true # 最初是否可见end #==============================================================================# ■ Game_Temp#==============================================================================class Game_Temp attr_accessor :map_visible # 地图的表示状態 alias plan_map_window_initialize initialize def initialize plan_map_window_initialize @map_visible = true endend#==============================================================================# ■ Scene_Map#==============================================================================class Scene_Map #-------------------------------------------------------------------------- # ● 主处理 #-------------------------------------------------------------------------- alias plan_map_window_main main def main @map_window = Window_Map.new @map_window.visible = $game_temp.map_visible plan_map_window_main @map_window.dispose end #-------------------------------------------------------------------------- # ● 更新 #-------------------------------------------------------------------------- alias plan_map_window_update update def update $game_temp.map_visible = @map_window.visible plan_map_window_update unless $game_switches[PLAN_Map_Window::SWITCH] if Input.trigger?(PLAN_Map_Window::ON_OFF_KEY) if @map_window.visible @map_window.visible = false else @map_window.visible = true end end else if @map_window.visible @map_window.visible = false end end if @map_window.visible @map_window.update end end #-------------------------------------------------------------------------- # ● 场所移动的变化 #-------------------------------------------------------------------------- alias plan_map_window_transfer_player transfer_player def transfer_player visible = @map_window.visible @map_window.visible = false plan_map_window_transfer_player @map_window.dispose @map_window = Window_Map.new @map_window.visible = visible endend#==============================================================================# ■ Window_Map#==============================================================================class Window_Map < Window_Base #-------------------------------------------------------------------------- # ● 初始化 #-------------------------------------------------------------------------- def initialize x = PLAN_Map_Window::WIN_X y = PLAN_Map_Window::WIN_Y w = PLAN_Map_Window::WIN_WIDTH h = PLAN_Map_Window::WIN_HEIGHT super(x, y, w, h) unless PLAN_Map_Window::WINDOWSKIN.empty? self.windowskin = RPG::Cache.windowskin(PLAN_Map_Window::WINDOWSKIN) end self.contents = Bitmap.new(width - 32, height - 32) self.opacity = PLAN_Map_Window::OPACITY self.contents_opacity = PLAN_Map_Window::C_OPACITY @map_data = $game_map.data @tileset = RPG::Cache.tileset($game_map.tileset_name) @autotiles = [] for i in 0..6 autotile_name = $game_map.autotile_names[i] @autotiles[i] = RPG::Cache.autotile(autotile_name) end @old_real_x = $game_player.real_x @old_real_y = $game_player.real_y @all_map = make_all_map self.visible = PLAN_Map_Window::VISIBLE refresh end #-------------------------------------------------------------------------- # ● 缩小图做成 #-------------------------------------------------------------------------- def make_all_map all_map = Bitmap.new($game_map.width * 32, $game_map.height * 32) for y in 0...$game_map.height for x in 0...$game_map.width 。

      点击阅读更多内容
      关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
      手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
      ©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.