赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 14813 |
最后登录 | 2016-11-13 |
在线时间 | 135 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 52
- 在线时间
- 135 小时
- 注册时间
- 2011-11-5
- 帖子
- 83
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 ji3rul4coco 于 2013-10-4 22:52 编辑
我只要用顯示在畫面上的功能,所以想把菜單中的信息修掉
請各位幫個忙,謝謝。
腳本如下
#============================================================================== # ■ 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
#==============================================================================
# ■ 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
|
|