| 
 
| 赞 | 0 |  
| VIP | 0 |  
| 好人卡 | 9 |  
| 积分 | 1 |  
| 经验 | 2256 |  
| 最后登录 | 2017-2-11 |  
| 在线时间 | 45 小时 |  
 Lv1.梦旅人 
	梦石0 星屑50 在线时间45 小时注册时间2011-6-6帖子70 | 
| 
本帖最后由 160445706 于 2011-7-7 19:06 编辑
x
加入我们,或者,欢迎回来。您需要 登录 才可以下载或查看,没有帐号?注册会员  
 用法:国际惯例,放在main前面.复制代码
class Window_exit  <  Window_Base
  def initialize
    super(224,132,192,192)
    self.back_opacity = 0  
    self.opacity = 0
    self.contents_opacity = 255
    self.contents = Bitmap.new(width - 32, height - 32)
    self.visible = true
    update
  end
  def update
    self.contents.clear
    self.contents.draw_text(0, 0 , self.width - 32 , 24,"感谢使用",0)
  end
end
def exit(n)
  thexit=Window_exit.new
  thexit.update
if $scene!=Scene_Title
  file = File.open("Save3.rxdata", "wb")
  characters = []
  for i in 0...$game_party.actors.size
    actor = $game_party.actors[i]
    characters.push([actor.character_name, actor.character_hue])
  end
  # 写入描绘存档文件用的角色数据
  Marshal.dump(characters, file)
  # 写入测量游戏时间用画面计数
  Marshal.dump(Graphics.frame_count, file)
  # 增加 1 次存档次数
  $game_system.save_count += 1
  # 保存魔法编号
  # (将编辑器保存的值以随机值替换)
  $game_system.magic_number = $data_system.magic_number
  # 写入各种游戏对像
  Marshal.dump($game_system, file)
  Marshal.dump($game_switches, file)
  Marshal.dump($game_variables, file)
  Marshal.dump($game_self_switches, file)
  Marshal.dump($game_screen, file)
  Marshal.dump($game_actors, file)
  Marshal.dump($game_party, file)
  Marshal.dump($game_troop, file)
  Marshal.dump($game_map, file)
  Marshal.dump($game_player, file)
  file.close
end
  $scene = nil
end
 | 
 |