| 赞 | 36 |
| VIP | |
| 好人卡 | |
| 积分 | 365 |
| 经验 | |
| 最后登录 | 2026-11-14 |
| 在线时间 | 614 小时 |
- 梦石
- 2
- 星屑
- 34507
- 在线时间
- 614 小时
- 注册时间
- 2014-7-18
- 回帖
- 647
 
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
自己为了提高脚本水平,所以写了一个课程表显示系统,现在只写了一个投影,想要测试时,却发现只要选择课程表投影选项时,就会造成程序无响应,测试了win10和win8,都是这样...
这是我的所有脚本代码:- $课程表 = []
- module DataManager
- def self.check_player_location
- msgbox("欢迎使用课程表显示系统!\n版本号:V0.1")
- end
- end
- class Window_TitleCommand < Window_Command
- #--------------------------------------------------------------------------
- # ● 生成指令列表
- #--------------------------------------------------------------------------
- def make_command_list
- add_command(Vocab::new_game, :new_game)#, continue_enabled)
- add_command(Vocab::continue, :continue)
- add_command(Vocab::shutdown, :shutdown)
- end
- end
- class Scene_Title < Scene_Base
- #--------------------------------------------------------------------------
- # ● 指令“课程表投影”
- #--------------------------------------------------------------------------
- def command_new_game
- close_command_window
- SceneManager.goto(Scene_投影)
- end
- #--------------------------------------------------------------------------
- # ● 指令“课程表设置”
- #--------------------------------------------------------------------------
- def command_continue
- close_command_window
- SceneManager.call(Scene_设置)
- end
- end
- class Scene_投影 < Scene_Base
- def start
- super
- 投影
- end
- def 投影
- x = Window_投影.new
- end
- end
- class Window_投影 < Window_Base
- def initialize
- super(-15,-40,192,10000)
- refresh
- end
- def update
- super
- refresh
- end
- def refresh
- 代入
- 投影(课程)
- end
- def 投影(a,b,c,d,e,f,g,h,i,j,s)
- self.contents.font.name = ["楷体"]#_GB2312
- self.contents.font.size = 48
- 变色 if 节次 == 1
- draw_text(0,0,96,96,a)
- 还原
- 变色 if 节次 == 2
- draw_text(0,40,96,96,b)
- 还原
- 变色 if 节次 == 3
- draw_text(0,80,96,96,c)
- 还原
- 变色 if 节次 == 4
- draw_text(0,120,96,96,d)
- 还原
- 变色 if 节次 == 11
- draw_text(0,145,96,96,"—")
- 还原
- 变色 if 节次 == 5
- draw_text(0,168,96,96,e)
- 还原
- 变色 if 节次 == 6
- draw_text(0,208,96,96,f)
- 还原
- 变色 if 节次 == 7
- draw_text(0,248,96,96,g)
- 还原
- 变色 if 节次 == 8
- draw_text(0,288,96,96,h)
- 还原
- 变色 if 节次 == 12
- draw_text(0,313,96,96,"—")
- 还原
- 变色 if 节次 == 9
- draw_text(0,336,96,96,i)
- 还原
- 变色 if 节次 == 10
- draw_text(0,376,96,96,j)
- self.opacity = 0
- end
- def 代入
- #判断星期
- 星期 = Time.new.wday
- case 星期
- when 1
- s = 11
- when 2
- s = 21
- when 3
- s = 31
- when 4
- s = 41
- when 5
- s = 51
- when 6
- s = 61
- when 0
- s = 71
- end
- 课程 = $课程表[s,10]
- #判断正在上的课
- 时 = Time.now.strftime("%H").to_i
- 分 = Time.now.strftime("%M").to_i
- #第一节
- 节次 = 1 if 时 <= 8 && 分 <= 45
- #第二节
- 节次 = 2 if 时 == 8 && 分 > 45
- 节次 = 2 if 时 == 9 && 分 <= 40
- #第三节
- 节次 = 3 if 时 == 10 && 分 <= 55
- 节次 = 3 if 时 == 9 && 分 > 40
- #第四节
- 节次 = 4 if 时 == 10 && 分 > 55
- 节次 = 4 if 时 == 11 && 分 <= 50
- #中午
- 节次 = 11 if 时 == 11 && 分 > 50
- 节次 = 11 if 时 == 12
- 节次 = 11 if 时 == 13
- 节次 = 11 if 时 == 14 && $夏令时 == true
- #第五节
- 节次 = 5 if 时 == 15 && 分 <= 45 && $夏令时 == true
- 节次 = 5 if 时 == 14 && 分 <= 45 && $夏令时 == false
- #第六节
- 节次 = 6 if 时 == 15 && 分 > 45 && $夏令时 == true
- 节次 = 6 if 时 == 16 && 分 <= 40 && $夏令时 == true
- 节次 = 6 if 时 == 14 && 分 > 45 && $夏令时 == false
- 节次 = 6 if 时 == 15 && 分 <= 40 && $夏令时 == false
- #第七节
- 节次 = 7 if 时 == 16 && 分 > 40 && $夏令时 == true
- 节次 = 7 if 时 == 17 && 分 <= 35 && $夏令时 == true
- 节次 = 7 if 时 == 15 && 分 > 50 && $夏令时 == false
- 节次 = 7 if 时 == 16 && 分 <= 55 && $夏令时 == false
- #第八节
- 节次 = 8 if 时 == 17 && 分 > 35 && $夏令时 == true
- 节次 = 8 if 时 == 18 && 分 <= 30 && $夏令时 == true
- 节次 = 8 if 时 == 16 && 分 > 55 && $夏令时 == false
- 节次 = 8 if 时 == 17 && 分 <= 50 && $夏令时 == false
- #小自习
- 节次 = 12 if 时 == 18 && 分 > 30 && $夏令时 == true
- 节次 = 12 if 时 == 19 && 分 <= 20 && $夏令时 == true
- 节次 = 12 if 时 == 17 && 分 > 45 && $夏令时 == false
- 节次 = 12 if 时 == 18 && $夏令时 == false
- 节次 = 12 if 时 == 19 && 分 <= 10 && $夏令时 == false
- #晚1
- 节次 = 9 if 时 == 19 && 分 > 20 && $夏令时 == true
- 节次 = 9 if 时 == 20 && 分 <= 10 && $夏令时 == true
- 节次 = 9 if 时 == 19 && 分 > 10 && $夏令时 == false
- 节次 = 9 if 时 == 20 && 分 <= 0 && $夏令时 == false
- #晚2
- 节次 = 10 if 时 == 20 && 分 > 10 && $夏令时 == true
- 节次 = 10 if 时 == 21 && $夏令时 == true
- 节次 = 10 if 时 == 20 && 分 > 0 && $夏令时 == false
- 节次 = 10 if 时 == 20 && 分 <= 50 && $夏令时 == false
- end
- def 还原
- change_color(Color.new(255,255,255,255))
- end
- def 变色
- change_color(Color.new(0,255,0,255))
- end
- end
复制代码
求大神看看到底是怎么回事 |
|