查看: 4962|回复: 2

[已经解决] 如何实现独立于存档外的成就系统?

[复制链接]
梦石
0
星屑
50
在线时间
23 小时
注册时间
2016-1-19
回帖
9
发表于 2016-2-29 17:31:07 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
RT

即开启一个存档后,在游戏中触发各种剧情获得所谓的“成就”,之后可以在存档外的游戏菜单中看到(比如菜单中增加“成就”选项,进入可以查看解锁的成就)。

而开启或读取新的其他存档时,获得的成就依然可以增加到外面的“成就列表”中。

也就是说,如何做出与存档无关的开关?并且能在游戏菜单中查看?

谢谢!
梦石
0
星屑
1232
在线时间
1017 小时
注册时间
2011-4-30
回帖
1464
发表于 2016-2-29 19:59:59 | 显示全部楼层

  1. ConfigManager.makeData = function() {
  2.     var config = {};
  3.     config.alwaysDash = this.alwaysDash;
  4.     config.commandRemember = this.commandRemember;
  5.     config.bgmVolume = this.bgmVolume;
  6.     config.bgsVolume = this.bgsVolume;
  7.     config.meVolume = this.meVolume;
  8.     config.seVolume = this.seVolume;
  9.     config.nr = this.nr || {}
  10.     return config;
  11. };
  12. //应用数据
  13. ConfigManager.applyData = function(config) {
  14.     this.alwaysDash = this.readFlag(config, 'alwaysDash');
  15.     this.commandRemember = this.readFlag(config, 'commandRemember');
  16.     this.bgmVolume = this.readVolume(config, 'bgmVolume');
  17.     this.bgsVolume = this.readVolume(config, 'bgsVolume');
  18.     this.meVolume = this.readVolume(config, 'meVolume');
  19.     this.seVolume = this.readVolume(config, 'seVolume');
  20.     this.nr = config.nr  || {}
  21.    
  22. };
复制代码
//使用方法
//设置
ConfigManager.nr[数据名] = xxx
//读取
var  x = ConfigManager.nr[数据名]

保存下来
ConfigManager.save()

点评

还是不太懂,这是个插件吗?  发表于 2016-2-29 22:14
回复

使用道具 举报

梦石
0
星屑
60
在线时间
306 小时
注册时间
2014-8-5
回帖
403
发表于 2016-3-4 15:46:41 | 显示全部楼层
  点我进入    
       ↓      
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部