update: 更新到godot4.4.1,并大量重构代码
This commit is contained in:
17
Scripts/Utilities/IConfig.cs
Normal file
17
Scripts/Utilities/IConfig.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
public interface IConfigManager {
|
||||
void SetFilePath(string filePath);
|
||||
void SetDefault(Dictionary<string, object> defalutConfig);
|
||||
T GetValue<T>(string key);
|
||||
void SetValue<T>(string key, [NotNull]T value) {
|
||||
ArgumentNullException.ThrowIfNull(key);
|
||||
SetValue(key, (object?)value);
|
||||
}
|
||||
void SetValue(string key, [NotNull]object? value);
|
||||
bool HasKey(string key);
|
||||
void SaveToFile();
|
||||
void LoadFromFile();
|
||||
}
|
Reference in New Issue
Block a user