赞 | 26 |
VIP | 0 |
好人卡 | 2 |
积分 | 31 |
经验 | 24979 |
最后登录 | 2024-1-20 |
在线时间 | 764 小时 |
Lv3.寻梦者
- 梦石
- 0
- 星屑
- 3078
- 在线时间
- 764 小时
- 注册时间
- 2008-7-5
- 帖子
- 760
|
- class Scene_Map
- #--------------------------------------------------------------------------
- # ● 主处理
- #--------------------------------------------------------------------------
- def main
- # 生成活动块
- @spriteset = Spriteset_Map.new
- # 生成信息窗口
- @message_window = Window_Message.new
- @time_date_window = Window_Time_Date.new
- # 执行过渡
- Graphics.transition
- # 主循环
- loop do
- # 刷新游戏画面
- Graphics.update
- # 刷新输入信息
- Input.update
- # 刷新画面
- update
- # 如果画面切换的话就中断循环
- if $scene != self
- break
- end
- end
- # 准备过渡
- Graphics.freeze
- # 释放活动块
- @spriteset.dispose
- # 释放信息窗口
- @message_window.dispose
- @time_date_window.dispose
- # 标题画面切换中的情况下
- if $scene.is_a?(Scene_Title)
- # 淡入淡出画面
- Graphics.transition
- Graphics.freeze
- end
- end
- alias timedate_update update
- def update
- @time_date_window.update
- timedate_update
- end # end def update
- #-----------------------------------------
- class Window_Time_Date < Window_Base
- #-----------------------------------------
- def initialize
- super(0, 0, 130, 55)
- self.contents = Bitmap.new(width - 32, height - 32)
- $game_variables[3] = 1
- $game_variables[4] = 1
- $game_variables[5] = 1
- refresh
- end # end def initialize
- def refresh
- @total_sec = Graphics.frame_count
- if $game_variables[3] >= 30 + 1
- $game_variables[3] = 1
- $game_variables[4] += 1
- end # end if $game_variables[3] >= 30 + 1
-
- if $game_variables[4] >= 12 + 1
- $game_variables[4] = 1
- $game_variables[5] += 1
- end # end if $game_variables[4] >= 12 + 1
-
- text_day = ["","1日","2日","3日","4日","5日","6日","7日","8日","9日","10日",
- "11日","12日","13日","14日","15日","16日","17日","18日","19日","20日",
- "21日","22日","23日","24日","25日","26日","27日","28日","29日","30日",][$game_variables[3]]
- text_month = ["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月",
- "11月","12月",][$game_variables[4]]
- text_year = ["", "第1年","第2年","第3年","第4年"][$game_variables[5]]
- self.contents.clear
- self.contents.font.color = normal_color
- self.contents.draw_text(0, -5, 128, 32, text_month)
- self.contents.font.color = normal_color
- self.contents.draw_text(45, -5, 128, 32, text_day)
- self.contents.font.color = normal_color
- self.contents.draw_text(65, -5, 128, 32,text_year)
- end # end def refresh
- def update
- super
- refresh
- end
- end
- end
复制代码
变量3对应天数,变量4对应月份,变量5对应年 版主对此帖的认可:『正确解答,补上悬赏积分,感激你的热情帮助...』,积分『+350』。 |
|