查看: 1704|回复: 1

[已经解决] "地圖信息"腳本修改。

[复制链接]
梦石
0
星屑
52
在线时间
135 小时
注册时间
2011-11-5
回帖
49
发表于 2013-10-4 22:21:20 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 ji3rul4coco 于 2013-10-4 22:52 编辑

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

2.jpg

腳本如下

  1. #==============================================================================
  2. # ■ Game_Player
  3. #------------------------------------------------------------------------------
  4. #  處理玩家人物的類。擁有事件啟動的判定、地圖的卷動等功能。
  5. #   本類的實例請參考 $game_player 。
  6. #==============================================================================

  7. class Game_Player < Game_Character
  8.   
  9.   def getX
  10.     @x
  11.   end
  12.   
  13.   def getY
  14.     @y
  15.   end
  16.   
  17. end

  18. #==============================================================================
  19. # ■ Scene_Menu
  20. #------------------------------------------------------------------------------
  21. #  菜單畫面
  22. #==============================================================================

  23. class Scene_Menu < Scene_MenuBase

  24.   #--------------------------------------------------------------------------
  25.   # ● 生成窗口
  26.   #--------------------------------------------------------------------------
  27.   def create_gold_window
  28.     @gold_window = Window_Gold.new
  29.     @gold_window.x = 0
  30.     @gold_window.y = Graphics.height - @gold_window.height
  31.     # 生成地圖信息窗口
  32.     @mapinfos_window = Window_MapInfo.new
  33.     @mapinfos_window.x = 0
  34.     @mapinfos_window.y = Graphics.height - @mapinfos_window.height - @gold_window.height
  35.    
  36.   end
  37.   
  38. end

  39. #==============================================================================
  40. # ■ Window_MapInfo
  41. #------------------------------------------------------------------------------
  42. #  顯示當前信息的窗口。 By SkyZH
  43. #==============================================================================

  44. class Window_MapInfo < Window_Base
  45.   #--------------------------------------------------------------------------
  46.   # ● 初始化對像
  47.   #--------------------------------------------------------------------------
  48.   def initialize
  49.     super(317, 270, window_width, 144)
  50.     self.opacity = 255
  51.     refresh
  52.   end
  53.   #--------------------------------------------------------------------------
  54.   # ● 獲取窗口的寬度
  55.   #--------------------------------------------------------------------------
  56.   def window_width
  57.     return 225
  58.   end
  59.   #--------------------------------------------------------------------------
  60.   # ● 刷新
  61.   #--------------------------------------------------------------------------
  62.   def refresh
  63.     self.contents.clear
  64.     self.contents.font.color = normal_color
  65.     @a=$game_map.width
  66.     @b=$game_map.height
  67.     draw_text(0, 0,             window_width-24, line_height,"智慧 " + $game_variables[1].to_s)
  68.     draw_text(0, line_height,   window_width-24, line_height,"魅力 " + $game_variables[2].to_s)
  69.     draw_text(0, line_height*2, window_width-24, line_height,"修養 " + $game_variables[3].to_s)
  70.     draw_text(0, line_height*3, window_width-24, line_height,"體貼 " + $game_variables[4].to_s)
  71.     draw_text(0, line_height*4, window_width-24, line_height,"感受 " + $game_variables[10].to_s)
  72.     draw_text(100, 0,             window_width-24, line_height,"道德 " + $game_variables[5].to_s)
  73.     draw_text(100, line_height,   window_width-24, line_height,"自尊 " + $game_variables[6].to_s)
  74.     draw_text(100, line_height*2, window_width-24, line_height,"勇氣 " + $game_variables[7].to_s)
  75.     draw_text(100, line_height*3, window_width-24, line_height,"聲望 " + $game_variables[8].to_s)
  76.     draw_text(100, line_height*4, window_width-24, line_height,"疲勞 " + $game_variables[9].to_s)

  77.   end
  78. end

  79. class Spriteset_Map
  80.   #--------------------------------------------------------------------------
  81.   # ● 初始化對象
  82.   #--------------------------------------------------------------------------
  83.   def initialize
  84.     create_viewports
  85.     create_tilemap
  86.     create_parallax
  87.     create_characters
  88.     create_shadow
  89.     create_weather
  90.     create_pictures
  91.     create_timer
  92.     @MapInfoWin=Window_MapInfo.new
  93.     update
  94.   end
  95.   
  96.   def dispose
  97.     dispose_tilemap
  98.     dispose_parallax
  99.     dispose_characters
  100.     dispose_shadow
  101.     dispose_weather
  102.     dispose_pictures
  103.     dispose_timer
  104.     dispose_viewports
  105.     @MapInfoWin.dispose
  106.   end
  107.   
  108.   def update
  109.     update_tileset
  110.     update_tilemap
  111.     update_parallax
  112.     update_characters
  113.     update_shadow
  114.     update_weather
  115.     update_pictures
  116.     update_timer
  117.     update_viewports
  118.     if $game_switches[1]==false then #通過1號開關控制信息窗口是否顯示
  119.       @MapInfoWin.visible=false
  120.     else
  121.       @MapInfoWin.visible=true
  122.     end
  123.     @MapInfoWin.refresh
  124.   end

  125. end
复制代码

梦石
1
星屑
23371
在线时间
9572 小时
注册时间
2012-6-19
回帖
7021

开拓者短篇九导演组冠军

发表于 2013-10-4 22:36:39 | 显示全部楼层
把脚本36~38行删掉即可

点评

謝謝  发表于 2013-10-4 22:54

评分

参与人数 1梦石 +1 收起 理由
熊喵酱 + 1 认可答案

查看全部评分

回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部