class Scene_Map
def main
@spriteset = Spriteset_Map.new
@message_window = Window_Message.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end # end if $scene != self
end # end loop do
Graphics.freeze
@spriteset.dispose
@message_window.dispose
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end # end if $scene.is_a?(Scene_Title)
end # end def main
end # end class Scene_Map
class Scene_Map
def main
@spriteset = Spriteset_Map.new
@message_window = Window_Message.new
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end # end if $scene != self
end # end loop do
Graphics.freeze
@spriteset.dispose
@message_window.dispose
if $scene.is_a?(Scene_Title)
Graphics.transition
Graphics.freeze
end # end if $scene.is_a?(Scene_Title)
end # end def main
end # end class Scene_Map
class Window_Time_Date < Window_Base
def initialize
super(0, 0, 640, 55)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end # end def initialize
def refresh
self.contents.draw_text(5, -5, 128, 32,"第一年")
self.contents.draw_text(80, -5, 128, 32, "一月")
self.contents.draw_text(125, -5, 128, 32, "一日")
self.contents.draw_text(185, -5, 128, 32, "子时")
self.contents.draw_text(230, -5, 128, 32, "初刻")
end # end def refresh
def update
end # end def update
end
if $game_player.screen_x >= (0 - 16) && $game_player.screen_x <= (0 + 640 + 16)
if $game_player.screen_y >= (0 - 16) && $game_player.screen_y <= (0 + 55 + 16)
self.x = 425
self.y = 0
else
self.x = 0
self.y = 0
end # end if
else
self.x = 0
self.y = 0
end # end if
当角色座标小於等於窗口的左方并且大於等於窗口的右方时
当角色座标小於等於窗口的上方并且大於等於窗口的下方时
改变窗口的座标
除此以外的场合
恢复窗口座标
分歧结束
除此以外的场合
恢复窗口座标
分歧结束
if Input.press?(Input::A)
self.x = 0
self.y = 0
else
self.y = - (55) + 8
end
if $game_player.screen_x >= (0 - 16) && $game_player.screen_x <= (0 + 640 + 16)
if $game_player.screen_y >= (0 - 16) && $game_player.screen_y <= (0 + 55 + 16)
self.x = 0
self.y = 425
@time_date_time_window_shifted = true
else
self.x = 0
self.y = 0
@time_date_time_window_shifted = false
end # end if $game_player.screen_y >= (0 - 16) && $game_player.screen_y <= (0 + 55 + 16)
else
self.x = 0
self.y = 0
@time_date_time_window_shifted = false
end # end if $game_player.screen_x >= (0 - 16) && $game_player.screen_x <= (0 + 640 + 16)
if Input.press?(Input::A)
if @time_date_time_window_shifted == true
self.x = 0
self.y = 425
else
self.x = 0
self.y = 0
end # end if @time_date_time_window_shifted = true
else
if @time_date_time_window_shifted == true
self.y = 425 + 55 - 8
else
self.y = -(55) + 8
end # end if @time_date_time_window_shifted = true
end # end if Input.press?(Input::A)
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |