refactor: Update Unity to 2022.3.62

This commit is contained in:
2025-06-21 01:22:02 +08:00
parent d71bf7d4a5
commit 283783954f
112 changed files with 778 additions and 907 deletions

View File

@@ -16,13 +16,11 @@ namespace Cryville.Common.Font {
}
public void Close() { Reader.Close(); }
public static FontFile Create(FileInfo file) {
switch (file.Extension) {
case ".ttf": case ".otf": return new FontFileTTF(file);
case ".ttc": case ".otc": return new FontFileTTC(file);
default: return null;
}
}
public static FontFile Create(FileInfo file) => file.Extension switch {
".ttf" or ".otf" => new FontFileTTF(file),
".ttc" or ".otc" => new FontFileTTC(file),
_ => null,
};
public Enumerator GetEnumerator() {
return new Enumerator(this);
@@ -42,7 +40,7 @@ namespace Cryville.Common.Font {
_index = -1;
}
public Typeface Current {
public readonly Typeface Current {
get {
if (_index < 0)
throw new InvalidOperationException(_index == -1 ? "Enum not started" : "Enum ended");
@@ -50,7 +48,7 @@ namespace Cryville.Common.Font {
}
}
object IEnumerator.Current { get { return Current; } }
readonly object IEnumerator.Current => Current;
public void Dispose() {
_index = -2;