查看: 59|回复: 0

[转载发布] 退出特效(渐变+自动保存+感谢使用)

[复制链接]
  • TA的每日心情
    开心
    11 小时前
  • 签到天数: 37 天

    连续签到: 3 天

    [LV.5]常住居民I

    2028

    主题

    32

    回帖

    7260

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    0
    卡币
    5184
    OK点
    16
    积分
    7260
    发表于 同元一千年八月二日(秋) | 显示全部楼层 |阅读模式
    1. 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)  endenddef exit(n)  thexit=Window_exit.new  thexit.updateif $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.closeend  $scene = nilend复制代码
    复制代码
    用法:国际惯例,放在main前面.
                 本帖来自P1论坛作者160445706,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址:https://rpg.blue/forum.php?mod=viewthread&tid=190215  若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。
    天天去同能,天天有童年!
    回复 论坛版权

    使用道具 举报

    ahome_bigavatar:guest
    ahome_bigavatar:welcomelogin
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2024-5-10 21:54 , Processed in 0.049995 second(s), 41 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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