设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1502|回复: 1
打印 上一主题 下一主题

[已经解决] 请人帮忙在这个脚本加个开关?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
977 小时
注册时间
2011-5-13
帖子
292
跳转到指定楼层
1
发表于 2012-5-12 08:17:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  1. class Scene_Map
  2.   alias new_main main
  3.   def main
  4.    @time_date_window = Window_Time_Date.new
  5.    new_main
  6.    @time_date_window.dispose
  7. end # end def main
  8. end # end class Scene_Map
  9. class Window_Time_Date < Window_Base
  10. def initialize
  11. super(0, 426, 310, 55)
  12. self.contents = Bitmap.new(width - 33, height - 33)
  13. refresh
  14. end # end def initialize
  15. def refresh
  16.     self.contents.clear
  17.     self.contents.font.color = system_color
  18.     self.contents.font.size = 19
  19.     self.back_opacity = 160
  20.     self.opacity = 160
  21.   @total_sec = Graphics.frame_count
  22.    if @total_sec % 2 ==0
  23.      $game_variables[27] += 1
  24.    end # end if @total_sec % 40 ==0
  25.    
  26.    if $game_variables[27] >= 60 + 0
  27.      $game_variables[27] = 0
  28.      $game_variables[28] += 1
  29.    end # end if $game_variables[1] >= 60 + 0
  30.    
  31.    if $game_variables[28] >= 23 + 1
  32.      $game_variables[28] = 0
  33.      $game_variables[29] += 1
  34.      $game_variables[32] += 1
  35.    end # end if $game_variables[2] >= 23 + 1
  36.    
  37.    if $game_variables[29] >= 30 + 1
  38.      $game_variables[29] = 1
  39.      $game_variables[30] += 1
  40.    end # end if $game_variables[3] >= 30 + 1
  41.    
  42.    if $game_variables[30] >= 12 + 1
  43.      $game_variables[30] = 1
  44.      $game_variables[31] += 1
  45.    end # end if $game_variables[4] >= 12 + 1
  46.    if $game_variables[32] >= 7
  47.      $game_variables[32] = 0
  48.      end
  49.    text_week = ["星期一","星期二","星期三","星期四","星期五","星期六","星期日"][$game_variables[32]]
  50.    text_min = ["00", "01", "02", "03", "04", "05", "06","07","08","09","10","11",
  51.    "12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27",
  52.    "28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43",
  53.    "44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59",
  54.    "60"][$game_variables[27]]
  55.    text_hour = ["00:", "01:", "02:", "03:", "04:", "05:", "06:",
  56.                 "07:", "08:", "09:", "10:", "11:", "12:","13:","14:","15:","16:",
  57.                 "17:","18:","19:","20:","21:","22:","23:","24:"][$game_variables[28]]
  58.    text_day = ["", "01日", "02日", "03日", "04日", "05日", "06日",
  59.                "07日", "08日", "09日", "10日", "11日", "12日",
  60.                "13日", "14日", "15日", "16日", "17日", "18日",
  61.                "19日", "20日", "21日", "22日", "23日", "24日",
  62.                "25日", "26日", "27日", "28日", "29日",
  63.                "30日"][$game_variables[29]]
  64.    text_month = ["", " 01月", " 02月", " 03月", " 04月", " 05月", " 06月",
  65.                   " 07月", " 08月", " 09月", " 10月", " 11月", " 12月"][$game_variables[30]]
  66.    text_year = ["2008年", "2009年", "2010年","2011年","2012年","2013年","2014年",
  67.    "2015年","2016年","2017年","2018年","2019年","2020年"][$game_variables[31]]
  68. self.contents.clear
  69. self.contents.draw_text(5, -5, 128, 32,text_year)
  70. self.contents.draw_text(60, -5, 128, 32, text_month)
  71. self.contents.draw_text(111, -5, 128, 32, text_day)
  72. self.contents.draw_text(155, -5, 128, 32, text_hour)
  73. self.contents.draw_text(184, -5, 128, 32, text_min)
  74. self.contents.draw_text(220, -5, 128, 32, text_week)
  75.   def update
  76.     super
  77.       refresh
  78.      
  79.   end
  80. end
  81. end
复制代码
我不懂怎么加,否则这样刚开始就出现了窗口很难看.

Lv1.梦旅人

虱子

梦石
0
星屑
121
在线时间
1782 小时
注册时间
2010-6-19
帖子
3597
2
发表于 2012-5-12 09:47:37 | 只看该作者
  1. class Scene_Map
  2.   alias louse_window_update update
  3.   def update
  4.     @time_date_window.visible = $game_switches[999]
  5.     louse_window_update
  6.   end
  7. end
  8. class Window_Time_Date
  9.   alias louse_window_refresh refresh
  10.   def refresh
  11.     self.visible = $game_switches[999]
  12.     louse_window_refresh
  13.   end
  14. end
复制代码

http://rpg.blue/thread-175056-1-2.html
PVZ型塔防物一个
http://rpg.blue/thread-155199-1-2.html
RMXP技术讨论区手动认可帖,得到答案请认可
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-27 21:20

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表