Code cleanup.
This commit is contained in:
@@ -22,14 +22,6 @@ namespace Cryville.Crtr {
|
||||
get;
|
||||
private set;
|
||||
}
|
||||
public static readonly string FileProtocolPrefix
|
||||
#if UNITY_STANDALONE_WIN
|
||||
= "file:///";
|
||||
#elif UNITY_ANDROID
|
||||
= "file://";
|
||||
#else
|
||||
#error No file protocol prefix is defined.
|
||||
#endif
|
||||
public static IAudioDeviceManager AudioManager;
|
||||
public static AudioClient AudioClient;
|
||||
public static SimpleSequencerSource AudioSequencer;
|
||||
@@ -129,19 +121,10 @@ namespace Cryville.Crtr {
|
||||
Settings.Default.Save();
|
||||
|
||||
Logger.Log("main", 1, "UI", "Initializing font manager");
|
||||
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
|
||||
var fontMatcher = new FallbackListFontMatcher(new FontManagerWindows());
|
||||
fontMatcher.LoadDefaultWindowsFallbackList();
|
||||
TMPAutoFont.FontMatcher = fontMatcher;
|
||||
TMPAutoFont.DefaultShader = Resources.Load<Shader>("TextMesh Pro/Shaders/TMP_SDF SSD");
|
||||
#elif UNITY_ANDROID
|
||||
var fontMatcher = new FallbackListFontMatcher(new FontManagerAndroid());
|
||||
fontMatcher.LoadDefaultAndroidFallbackList();
|
||||
TMPAutoFont.FontMatcher = fontMatcher;
|
||||
TMPAutoFont.DefaultShader = Resources.Load<Shader>("TextMesh Pro/Shaders/TMP_SDF-Mobile SSD");
|
||||
#else
|
||||
#error No font manager initialization logic.
|
||||
#endif
|
||||
TMPAutoFont.FontMatcher = new FallbackListFontMatcher(PlatformConfig.FontManager) {
|
||||
MapScriptToTypefaces = PlatformConfig.ScriptFontMap
|
||||
};
|
||||
TMPAutoFont.DefaultShader = Resources.Load<Shader>(PlatformConfig.TextShader);
|
||||
|
||||
Logger.Log("main", 1, "Game", "Initialized");
|
||||
}
|
||||
@@ -181,5 +164,14 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
Logger.Log("main", l, "Internal", "{0}\n{1}", condition, stackTrace);
|
||||
}
|
||||
|
||||
public static void SuspendBackgroundTasks() {
|
||||
NetworkTaskWorker.SuspendBackgroundTasks();
|
||||
Dialog.Suppress();
|
||||
}
|
||||
public static void ResumeBackgroundTasks() {
|
||||
Dialog.Release();
|
||||
NetworkTaskWorker.ResumeBackgroundTasks();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user