Project1
标题:
请人帮忙在这个脚本加个开关?
[打印本页]
作者:
纳尔德
时间:
2012-5-12 08:17
标题:
请人帮忙在这个脚本加个开关?
class Scene_Map
alias new_main main
def main
@time_date_window = Window_Time_Date.new
new_main
@time_date_window.dispose
end # end def main
end # end class Scene_Map
class Window_Time_Date < Window_Base
def initialize
super(0, 426, 310, 55)
self.contents = Bitmap.new(width - 33, height - 33)
refresh
end # end def initialize
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.font.size = 19
self.back_opacity = 160
self.opacity = 160
@total_sec = Graphics.frame_count
if @total_sec % 2 ==0
$game_variables[27] += 1
end # end if @total_sec % 40 ==0
if $game_variables[27] >= 60 + 0
$game_variables[27] = 0
$game_variables[28] += 1
end # end if $game_variables[1] >= 60 + 0
if $game_variables[28] >= 23 + 1
$game_variables[28] = 0
$game_variables[29] += 1
$game_variables[32] += 1
end # end if $game_variables[2] >= 23 + 1
if $game_variables[29] >= 30 + 1
$game_variables[29] = 1
$game_variables[30] += 1
end # end if $game_variables[3] >= 30 + 1
if $game_variables[30] >= 12 + 1
$game_variables[30] = 1
$game_variables[31] += 1
end # end if $game_variables[4] >= 12 + 1
if $game_variables[32] >= 7
$game_variables[32] = 0
end
text_week = ["星期一","星期二","星期三","星期四","星期五","星期六","星期日"][$game_variables[32]]
text_min = ["00", "01", "02", "03", "04", "05", "06","07","08","09","10","11",
"12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27",
"28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43",
"44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59",
"60"][$game_variables[27]]
text_hour = ["00:", "01:", "02:", "03:", "04:", "05:", "06:",
"07:", "08:", "09:", "10:", "11:", "12:","13:","14:","15:","16:",
"17:","18:","19:","20:","21:","22:","23:","24:"][$game_variables[28]]
text_day = ["", "01日", "02日", "03日", "04日", "05日", "06日",
"07日", "08日", "09日", "10日", "11日", "12日",
"13日", "14日", "15日", "16日", "17日", "18日",
"19日", "20日", "21日", "22日", "23日", "24日",
"25日", "26日", "27日", "28日", "29日",
"30日"][$game_variables[29]]
text_month = ["", " 01月", " 02月", " 03月", " 04月", " 05月", " 06月",
" 07月", " 08月", " 09月", " 10月", " 11月", " 12月"][$game_variables[30]]
text_year = ["2008年", "2009年", "2010年","2011年","2012年","2013年","2014年",
"2015年","2016年","2017年","2018年","2019年","2020年"][$game_variables[31]]
self.contents.clear
self.contents.draw_text(5, -5, 128, 32,text_year)
self.contents.draw_text(60, -5, 128, 32, text_month)
self.contents.draw_text(111, -5, 128, 32, text_day)
self.contents.draw_text(155, -5, 128, 32, text_hour)
self.contents.draw_text(184, -5, 128, 32, text_min)
self.contents.draw_text(220, -5, 128, 32, text_week)
def update
super
refresh
end
end
end
复制代码
我不懂怎么加,否则这样刚开始就出现了窗口很难看. dsu_plus_rewardpost_czw
作者:
Wind2010
时间:
2012-5-12 09:47
class Scene_Map
alias louse_window_update update
def update
@time_date_window.visible = $game_switches[999]
louse_window_update
end
end
class Window_Time_Date
alias louse_window_refresh refresh
def refresh
self.visible = $game_switches[999]
louse_window_refresh
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1