Project1

标题: "地圖信息"腳本修改。 [打印本页]

作者: ji3rul4coco    时间: 2013-10-4 22:21
标题: "地圖信息"腳本修改。
本帖最后由 ji3rul4coco 于 2013-10-4 22:52 编辑

我只要用顯示在畫面上的功能,所以想把菜單中的信息修掉
請各位幫個忙,謝謝。



腳本如下

RUBY 代码复制
  1. #==============================================================================
  2. # ■ Game_Player
  3. #------------------------------------------------------------------------------
  4. #  處理玩家人物的類。擁有事件啟動的判定、地圖的卷動等功能。
  5. #   本類的實例請參考 $game_player 。
  6. #==============================================================================
  7.  
  8. class Game_Player < Game_Character
  9.  
  10.   def getX
  11.     @x
  12.   end
  13.  
  14.   def getY
  15.     @y
  16.   end
  17.  
  18. end
  19.  
  20. #==============================================================================
  21. # ■ Scene_Menu
  22. #------------------------------------------------------------------------------
  23. #  菜單畫面
  24. #==============================================================================
  25.  
  26. class Scene_Menu < Scene_MenuBase
  27.  
  28.   #--------------------------------------------------------------------------
  29.   # ● 生成窗口
  30.   #--------------------------------------------------------------------------
  31.   def create_gold_window
  32.     @gold_window = Window_Gold.new
  33.     @gold_window.x = 0
  34.     @gold_window.y = Graphics.height - @gold_window.height
  35.     # 生成地圖信息窗口
  36.     @mapinfos_window = Window_MapInfo.new
  37.     @mapinfos_window.x = 0
  38.     @mapinfos_window.y = Graphics.height - @mapinfos_window.height - @gold_window.height
  39.  
  40.   end
  41.  
  42. end
  43.  
  44. #==============================================================================
  45. # ■ Window_MapInfo
  46. #------------------------------------------------------------------------------
  47. #  顯示當前信息的窗口。 By SkyZH
  48. #==============================================================================
  49.  
  50. class Window_MapInfo < Window_Base
  51.   #--------------------------------------------------------------------------
  52.   # ● 初始化對像
  53.   #--------------------------------------------------------------------------
  54.   def initialize
  55.     super(317, 270, window_width, 144)
  56.     self.opacity = 255
  57.     refresh
  58.   end
  59.   #--------------------------------------------------------------------------
  60.   # ● 獲取窗口的寬度
  61.   #--------------------------------------------------------------------------
  62.   def window_width
  63.     return 225
  64.   end
  65.   #--------------------------------------------------------------------------
  66.   # ● 刷新
  67.   #--------------------------------------------------------------------------
  68.   def refresh
  69.     self.contents.clear
  70.     self.contents.font.color = normal_color
  71.     @a=$game_map.width
  72.     @b=$game_map.height
  73.     draw_text(0, 0,             window_width-24, line_height,"智慧 " + $game_variables[1].to_s)
  74.     draw_text(0, line_height,   window_width-24, line_height,"魅力 " + $game_variables[2].to_s)
  75.     draw_text(0, line_height*2, window_width-24, line_height,"修養 " + $game_variables[3].to_s)
  76.     draw_text(0, line_height*3, window_width-24, line_height,"體貼 " + $game_variables[4].to_s)
  77.     draw_text(0, line_height*4, window_width-24, line_height,"感受 " + $game_variables[10].to_s)
  78.     draw_text(100, 0,             window_width-24, line_height,"道德 " + $game_variables[5].to_s)
  79.     draw_text(100, line_height,   window_width-24, line_height,"自尊 " + $game_variables[6].to_s)
  80.     draw_text(100, line_height*2, window_width-24, line_height,"勇氣 " + $game_variables[7].to_s)
  81.     draw_text(100, line_height*3, window_width-24, line_height,"聲望 " + $game_variables[8].to_s)
  82.     draw_text(100, line_height*4, window_width-24, line_height,"疲勞 " + $game_variables[9].to_s)
  83.  
  84.   end
  85. end
  86.  
  87. class Spriteset_Map
  88.   #--------------------------------------------------------------------------
  89.   # ● 初始化對象
  90.   #--------------------------------------------------------------------------
  91.   def initialize
  92.     create_viewports
  93.     create_tilemap
  94.     create_parallax
  95.     create_characters
  96.     create_shadow
  97.     create_weather
  98.     create_pictures
  99.     create_timer
  100.     @MapInfoWin=Window_MapInfo.new
  101.     update
  102.   end
  103.  
  104.   def dispose
  105.     dispose_tilemap
  106.     dispose_parallax
  107.     dispose_characters
  108.     dispose_shadow
  109.     dispose_weather
  110.     dispose_pictures
  111.     dispose_timer
  112.     dispose_viewports
  113.     @MapInfoWin.dispose
  114.   end
  115.  
  116.   def update
  117.     update_tileset
  118.     update_tilemap
  119.     update_parallax
  120.     update_characters
  121.     update_shadow
  122.     update_weather
  123.     update_pictures
  124.     update_timer
  125.     update_viewports
  126.     if $game_switches[1]==false then #通過1號開關控制信息窗口是否顯示
  127.       @MapInfoWin.visible=false
  128.     else
  129.       @MapInfoWin.visible=true
  130.     end
  131.     @MapInfoWin.refresh
  132.   end
  133.  
  134. end

作者: 喵呜喵5    时间: 2013-10-4 22:36
把脚本36~38行删掉即可




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1