Updated Readme
This commit is contained in:
parent
b1bd89a687
commit
f82b71877a
4 changed files with 60 additions and 38 deletions
|
|
@ -201,6 +201,19 @@ public class ActionGameManager : MonoBehaviour
|
|||
EntityInstance.ClearWeaponManagers();
|
||||
}
|
||||
|
||||
private class AetheriaInkFileHandler : IFileHandler {
|
||||
private DirectoryInfo NarrativeRoot { get; }
|
||||
|
||||
public AetheriaInkFileHandler(DirectoryInfo narrativeRoot)
|
||||
{
|
||||
NarrativeRoot = narrativeRoot;
|
||||
}
|
||||
|
||||
public string ResolveInkFilename (string includeName) => Path.Combine (NarrativeRoot.FullName, includeName);
|
||||
|
||||
public string LoadInkFileContents (string fullFilename) => File.ReadAllText (fullFilename);
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
Instance = this;
|
||||
|
|
@ -215,8 +228,13 @@ public class ActionGameManager : MonoBehaviour
|
|||
var narrativeFiles = narrativePath.EnumerateFiles("*.ink");
|
||||
foreach(var inkFile in narrativeFiles)
|
||||
{
|
||||
var compiler = new Compiler(File.ReadAllText(inkFile.FullName));
|
||||
_stories.Add(compiler.Compile());
|
||||
var compiler = new Compiler(File.ReadAllText(inkFile.FullName), new Compiler.Options
|
||||
{
|
||||
countAllVisits = true,
|
||||
fileHandler = new AetheriaInkFileHandler(narrativePath)
|
||||
});
|
||||
var story = compiler.Compile();
|
||||
_stories.Add(story);
|
||||
}
|
||||
|
||||
// _loadoutPath = GameDataDirectory.CreateSubdirectory("Loadouts");
|
||||
|
|
|
|||
|
|
@ -122,18 +122,21 @@ public class MainMenu : MonoBehaviour
|
|||
{
|
||||
Settings.SectorBackgroundSettings.NoisePosition = Random.value * 1000;
|
||||
ActionGameManager.IsTutorial = false;
|
||||
var task = Task.Run(() => new Sector(
|
||||
Settings.SectorGenerationSettings,
|
||||
Settings.SectorBackgroundSettings,
|
||||
Settings.NameGeneratorSettings,
|
||||
ActionGameManager.CultCache,
|
||||
setState));
|
||||
task.ContinueWith(task => Observable.NextFrame().Subscribe(_ =>
|
||||
Task.Run(() =>
|
||||
{
|
||||
ActionGameManager.PlayerSettings.SavedRun = null;
|
||||
ActionGameManager.CurrentSector = task.Result;
|
||||
SceneManager.LoadScene("ARPG");
|
||||
}));
|
||||
var sector = new Sector(
|
||||
Settings.SectorGenerationSettings,
|
||||
Settings.SectorBackgroundSettings,
|
||||
Settings.NameGeneratorSettings,
|
||||
ActionGameManager.CultCache,
|
||||
setState);
|
||||
Observable.NextFrame().Subscribe(_ =>
|
||||
{
|
||||
ActionGameManager.PlayerSettings.SavedRun = null;
|
||||
ActionGameManager.CurrentSector = sector;
|
||||
SceneManager.LoadScene("ARPG");
|
||||
});
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -143,18 +146,21 @@ public class MainMenu : MonoBehaviour
|
|||
} while (Settings.TutorialBackgroundSettings.CloudDensity(float2(0.5f)) < .5f);
|
||||
|
||||
ActionGameManager.IsTutorial = true;
|
||||
var task = Task.Run(() => new Sector(
|
||||
Settings.TutorialGenerationSettings,
|
||||
Settings.TutorialBackgroundSettings,
|
||||
Settings.NameGeneratorSettings,
|
||||
ActionGameManager.CultCache,
|
||||
setState));
|
||||
task.ContinueWith(task => Observable.NextFrame().Subscribe(_ =>
|
||||
Task.Run(() =>
|
||||
{
|
||||
ActionGameManager.PlayerSettings.SavedRun = null;
|
||||
ActionGameManager.CurrentSector = task.Result;
|
||||
SceneManager.LoadScene("ARPG");
|
||||
}));
|
||||
var sector = new Sector(
|
||||
Settings.TutorialGenerationSettings,
|
||||
Settings.TutorialBackgroundSettings,
|
||||
Settings.NameGeneratorSettings,
|
||||
ActionGameManager.CultCache,
|
||||
setState);
|
||||
Observable.NextFrame().Subscribe(_ =>
|
||||
{
|
||||
ActionGameManager.PlayerSettings.SavedRun = null;
|
||||
ActionGameManager.CurrentSector = sector;
|
||||
SceneManager.LoadScene("ARPG");
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
_nextMenu.panel.AddButton("Settings",
|
||||
|
|
|
|||
Loading…
Reference in a new issue