Project1
标题:
游戏时间改为系统时间
[打印本页]
作者:
wyffaddy
时间:
2008-6-20 04:43
标题:
游戏时间改为系统时间
从主战找到了一个脚本,我把它演变成菜单里的游戏时间了。
下面切入正题:
先吧Window_PlayTime的脚本覆盖
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
#==============================================================================
# ■ Window_PlayTime
#------------------------------------------------------------------------------
# 菜单画面显示游戏时间的窗口。
#==============================================================================
class Window_PlayTime < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 128 )
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, -4, 120, 32, "当前时间")
@total_sec = Graphics.frame_count / Graphics.frame_rate
t = Time.now
$game_variables[204] = t.wday # 星期
$game_variables[208] = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"][$game_variables[204]]
text = sprintf("%02d:%02d:%02d", t.hour, t.min, t.sec)
text2 = sprintf("%02d.%02d.%02d", t.year, t.month, t.day)
text3 = sprintf($game_variables[208])
self.contents.font.color = normal_color
self.contents.draw_text(4, 24, 110, 32, text2, 2)
self.contents.draw_text(-25, 48, 110, 32, text3, 2)
self.contents.draw_text(-3, 72, 110, 32, text, 2)
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
#==============================================================================
# 本脚本来自www.66RPG.com,使用和转载请保留此信息
#==============================================================================
复制代码
好了,然后进入Window_Steps
在第12行
super(0, 0, 160, 96)
改为
super(0, 0, 160, 64)
在第24行
self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2)
改为
self.contents.draw_text(4, 0, 120, 32, $game_party.steps.to_s, 2)
最后
在Scene_Menu里面
将48行的
@steps_window.y = 320
改为
@steps_window.y = 352
大功告成!
作者:
火鸡三毛老大
时间:
2008-6-20 04:59
XP好像很久之前就有了....
作者:
wyffaddy
时间:
2008-6-20 05:06
什么意思?
我弄的是系统时间,
不是游戏时间。
你的话有些深奥……
作者:
劍之飛龍☆
时间:
2008-6-20 05:11
虽然早就知道了,但还是顶下
作者:
wyffaddy
时间:
2008-6-20 05:22
说真的,我是第一次该脚本,就怕改的出错了改不会来了。我记忆力不好呀{/gg}。
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1