# ◎ 设定时间
#--------------------------------------------------------------------------
def set_time
time = @game_time
@second = @game_time %60
@second = 0 if second == 60
@minute = @game_time / 60 % 24
@hour = @game_time / 3600
@second_hand.angle = -second*6
@minute_hand.angle = -minute*6 - second.to_f/10
@hour_hand.angle = -hour*30 - (minute.to_f/60)*30 - second.to_f*(1.0/144)
end
end
#--------------------------------------------------------------------------
# ◎ 更改可见标志
#--------------------------------------------------------------------------
def change_visible
if @clock_show == $game_switches[SHOW_SWITCH_ID]
return
else
@clock_show = $game_switches[SHOW_SWITCH_ID]
end
for i in [@clock_bg, @hour_hand, @minute_hand, @second_hand, @top_button]
i.visible = $game_switches[SHOW_SWITCH_ID]
end
end
def create_clock_bg
@clock_bg = Sprite.new
@clock_bg.bitmap = Cache.picture("clock_bg")
@clock_bg.opacity = @alpha
@clock_bg.x = @x - @clock_bg.width/2
@clock_bg.y = @y - @clock_bg.height/2
@clock_bg.z = 999
end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |