查看: 1660|回复: 1

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

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

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

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

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

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

2.jpg

腳本如下

[pre lang="ruby" line="1"]#==============================================================================
# ■ Game_Player
#------------------------------------------------------------------------------
#  處理玩家人物的類。擁有事件啟動的判定、地圖的卷動等功能。
#   本類的實例請參考 $game_player 。
#==============================================================================

class Game_Player < Game_Character
  
  def getX
    @x
  end
  
  def getY
    @y
  end
  
end

#==============================================================================
# ■ Scene_Menu
#------------------------------------------------------------------------------
#  菜單畫面
#==============================================================================

class Scene_Menu < Scene_MenuBase

  #--------------------------------------------------------------------------
  # ● 生成窗口
  #--------------------------------------------------------------------------
  def create_gold_window
    @gold_window = Window_Gold.new
    @gold_window.x = 0
    @gold_window.y = Graphics.height - @gold_window.height
    # 生成地圖信息窗口
    @mapinfos_window = Window_MapInfo.new
    @mapinfos_window.x = 0
    @mapinfos_window.y = Graphics.height - @mapinfos_window.height - @gold_window.height
   
  end
  
end

#==============================================================================
# ■ Window_MapInfo
#------------------------------------------------------------------------------
#  顯示當前信息的窗口。 By SkyZH
#==============================================================================

class Window_MapInfo < Window_Base
  #--------------------------------------------------------------------------
  # ● 初始化對像
  #--------------------------------------------------------------------------
  def initialize
    super(317, 270, window_width, 144)
    self.opacity = 255
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 獲取窗口的寬度
  #--------------------------------------------------------------------------
  def window_width
    return 225
  end
  #--------------------------------------------------------------------------
  # ● 刷新
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = normal_color
    @a=$game_map.width
    @b=$game_map.height
    draw_text(0, 0,             window_width-24, line_height,"智慧 " + $game_variables[1].to_s)
    draw_text(0, line_height,   window_width-24, line_height,"魅力 " + $game_variables[2].to_s)
    draw_text(0, line_height*2, window_width-24, line_height,"修養 " + $game_variables[3].to_s)
    draw_text(0, line_height*3, window_width-24, line_height,"體貼 " + $game_variables[4].to_s)
    draw_text(0, line_height*4, window_width-24, line_height,"感受 " + $game_variables[10].to_s)
    draw_text(100, 0,             window_width-24, line_height,"道德 " + $game_variables[5].to_s)
    draw_text(100, line_height,   window_width-24, line_height,"自尊 " + $game_variables[6].to_s)
    draw_text(100, line_height*2, window_width-24, line_height,"勇氣 " + $game_variables[7].to_s)
    draw_text(100, line_height*3, window_width-24, line_height,"聲望 " + $game_variables[8].to_s)
    draw_text(100, line_height*4, window_width-24, line_height,"疲勞 " + $game_variables[9].to_s)

  end
end

class Spriteset_Map
  #--------------------------------------------------------------------------
  # ● 初始化對象
  #--------------------------------------------------------------------------
  def initialize
    create_viewports
    create_tilemap
    create_parallax
    create_characters
    create_shadow
    create_weather
    create_pictures
    create_timer
    @MapInfoWin=Window_MapInfo.new
    update
  end
  
  def dispose
    dispose_tilemap
    dispose_parallax
    dispose_characters
    dispose_shadow
    dispose_weather
    dispose_pictures
    dispose_timer
    dispose_viewports
    @MapInfoWin.dispose
  end
  
  def update
    update_tileset
    update_tilemap
    update_parallax
    update_characters
    update_shadow
    update_weather
    update_pictures
    update_timer
    update_viewports
    if $game_switches[1]==false then #通過1號開關控制信息窗口是否顯示
      @MapInfoWin.visible=false
    else
      @MapInfoWin.visible=true
    end
    @MapInfoWin.refresh
  end

end[/pre]

梦石
1
星屑
23241
在线时间
9564 小时
注册时间
2012-6-19
回帖
7018

开拓者短篇九导演组冠军

发表于 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.

在本版发帖返回顶部