Project1
标题:
请问如何让游戏内时间和现实时间同步?
[打印本页]
作者:
huahuapro
时间:
2013-2-18 14:38
标题:
请问如何让游戏内时间和现实时间同步?
就像3ds动物之森那样??
谢谢!!!!
作者:
婉烟沉沫
时间:
2013-2-18 16:59
=-=昼夜交替脚本
作者:
huahuapro
时间:
2013-2-19 10:24
谢谢我找了,但是不适用xv
我在网上找了一个老外写的,但也是xp的,哪位老大能转化成xv的吗?太感谢了!
Time.now
复制代码
t = Time.now
time = t.strftime("%I:%M:%S %p")
date = t.strftime("%a, %d %b, %Y")
复制代码
#=================================================================
# ** Window_PlayTime
#-----------------------------------------------------------------
# This window displays play time on the menu screen.
#=================================================================
class Window_PlayTime < Window_Base
#---------------------------------------------------------------
# * Object Initialization
#---------------------------------------------------------------
def initialize
super(0, 0, 160, 64)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#---------------------------------------------------------------
# * Refresh
#---------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.size = 16
t = Time.now
time = t.strftime("%I:%M:%S %p")
date = t.strftime("%a, %d %b, %Y")
self.contents.font.color = normal_color
self.contents.draw_text(0, -2, 140, WLH, date, 1)
self.contents.draw_text(0, 14, 140, WLH, time, 1)
end
#---------------------------------------------------------------
# * Frame Update
#---------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1