Project1

标题: 求助,加入时间脚本后时钟静止不走动 [打印本页]

作者: luxifdcl    时间: 2010-10-31 20:51
提示: 作者被禁止或删除 内容自动屏蔽
作者: bbaugle    时间: 2010-10-31 21:36
应该是缺少了并行处理的事件了。我这里没有RMXP。不能帮你看了
比如.refresh或.update其中一个能刷新吧.要看脚本里它是怎么刷新的。就怎么给它作作刷新咯
作者: luxifdcl    时间: 2010-10-31 21:40
提示: 作者被禁止或删除 内容自动屏蔽
作者: bbaugle    时间: 2010-11-1 07:25
得失物品提示“或”中文输入法“起了冲突是不可能的,因为没有相同点..
然后我帮你弄好了.真的是缺少了刷新命令.
用这段脚本替换之前的Window_Time_Date
  1. class Scene_Map
  2.   alias old_main main
  3.   alias old_update update
  4.   def main
  5.     @time_date_window = Window_Time_Date.new
  6.     old_main
  7.   end
  8.   def update
  9.     @time_date_window.refresh
  10.     old_update
  11.   end
  12. end

  13. class Window_Time_Date < Window_Base
  14. def initialize
  15. super(0, 0, 250, 55)
  16. self.contents = Bitmap.new(width - 33, height - 33)
  17. refresh
  18. end # end def initialize
  19. def refresh
  20.     self.contents.clear
  21.     self.contents.font.color = system_color
  22.     self.contents.font.size = 19
  23.   @total_sec = Graphics.frame_count
  24.    if @total_sec % 1 ==0
  25.      $game_variables[51] += 1
  26.    end # end if @total_sec % 40 ==0
  27.    
  28.    if $game_variables[51] >= 60 + 0
  29.      $game_variables[51] = 0
  30.      $game_variables[52] += 1
  31.    end # end if $game_variables[1] >= 60 + 0
  32.    
  33.    if $game_variables[52] >= 23 + 1
  34.      $game_variables[52] = 0
  35.      $game_variables[53] += 1
  36.    end # end if $game_variables[2] >= 23 + 1
  37.    
  38.    if $game_variables[53] >= 30 + 1
  39.      $game_variables[53] = 1
  40.      $game_variables[54] += 1
  41.    end # end if $game_variables[3] >= 30 + 1
  42.    
  43.    if $game_variables[54] >= 12 + 1
  44.      $game_variables[54] = 1
  45.      $game_variables[55] += 1
  46.    end # end if $game_variables[4] >= 12 + 1
  47.    
  48.    text_min = ["00", "01", "02", "03", "04", "05", "06","07","08","09","10","11",
  49.    "12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27",
  50.    "28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43",
  51.    "44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59",
  52.    "60"][$game_variables[51]]
  53.    text_hour = ["00:", "01:", "02:", "03:", "04:", "05:", "06:",
  54.                 "07:", "08:", "09:", "10:", "11:", "12:","13:","14:","15:","16:",
  55.                 "17:","18:","19:","20:","21:","22:","23:","24:"][$game_variables[52]]
  56.    text_day = ["", "01日", "02日", "03日", "04日", "05日", "06日",
  57.                "07日", "08日", "09日", "10日", "11日", "12日",
  58.                "13日", "14日", "15日", "16日", "17日", "18日",
  59.                "19日", "20日", "21日", "22日", "23日", "24日",
  60.                "25日", "26日", "27日", "28日", "29日",
  61.                "30日"][$game_variables[53]]
  62.    text_month = ["", " 01月", " 02月", " 03月", " 04月", " 05月", " 06月",
  63.                   " 07月", " 08月", " 09月", " 10月", " 11月", " 12月"][$game_variables[54]]
  64.    text_year = ["2008年", "2009年", "2010年","2011年","2012年","2013年","2014年",
  65.    "2015年","2016年","2017年","2018年","2019年","2020年"][$game_variables[55]]
  66. self.contents.clear
  67. self.contents.draw_text(5, -5, 128, 32,text_year)
  68. self.contents.draw_text(60, -5, 128, 32, text_month)
  69. self.contents.draw_text(111, -5, 128, 32, text_day)
  70. self.contents.draw_text(155, -5, 128, 32, text_hour)
  71. self.contents.draw_text(184, -5, 128, 32, text_min)
  72.   def update
  73.     super
  74.       refresh
  75.   end
  76. end
  77. end
复制代码
(不过...时间也过得太快了吧..)





..
作者: luxifdcl    时间: 2010-11-1 18:07
提示: 作者被禁止或删除 内容自动屏蔽




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1