存档重构,游戏内容解锁机制;教程完善(未完成)
This commit is contained in:
@@ -94,6 +94,20 @@ namespace Ichni.Story
|
||||
Variables.stringVariables[key] = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除指定剧情变量在三种底层字典中的所有残留值。
|
||||
/// 仅删除内存值;需要持久化和故事树刷新时,应调用 <see cref="StoryProgress"/> 的统一接口。
|
||||
/// </summary>
|
||||
public static void Remove(string key)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(key)) return;
|
||||
|
||||
StoryVariablesSave vars = Variables;
|
||||
vars.floatVariables.Remove(key);
|
||||
vars.stringVariables.Remove(key);
|
||||
vars.boolVariables.Remove(key);
|
||||
}
|
||||
|
||||
public static void ClearAll()
|
||||
{
|
||||
StoryVariablesSave vars = Variables;
|
||||
|
||||
Reference in New Issue
Block a user