mirror of
https://github.com/Ratstail91/Mementos.git
synced 2025-11-29 10:34:27 +11:00
Committed everything
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace Ink
|
||||
{
|
||||
public interface IPlugin
|
||||
{
|
||||
// Hooks: if in doubt use PostExport, since the parsedStory is in a more finalised state.
|
||||
|
||||
// Hook for immediately after the story has been parsed into its basic Parsed hierarchy.
|
||||
// Could be useful for modifying the story before it's exported.
|
||||
void PostParse(Parsed.Story parsedStory);
|
||||
|
||||
// Hook for after parsed story has been converted into its runtime equivalent. Note that
|
||||
// during this process the parsed story will have changed structure too, to take into
|
||||
// account analysis of the structure of Weave, for example.
|
||||
void PostExport(Parsed.Story parsedStory, Runtime.Story runtimeStory);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: afc85318112c14186b267528f5930957
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ink
|
||||
{
|
||||
public class PluginManager
|
||||
{
|
||||
public PluginManager (List<string> pluginNames)
|
||||
{
|
||||
_plugins = new List<IPlugin> ();
|
||||
|
||||
// TODO: Make these plugin names DLL filenames, and load up their assemblies
|
||||
foreach (string pluginName in pluginNames) {
|
||||
//if (pluginName == "ChoiceListPlugin") {
|
||||
// _plugins.Add (new InkPlugin.ChoiceListPlugin ());
|
||||
//}else
|
||||
{
|
||||
throw new System.Exception ("Plugin not found");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void PostParse(Parsed.Story parsedStory)
|
||||
{
|
||||
foreach (var plugin in _plugins) {
|
||||
plugin.PostParse (parsedStory);
|
||||
}
|
||||
}
|
||||
|
||||
public void PostExport(Parsed.Story parsedStory, Runtime.Story runtimeStory)
|
||||
{
|
||||
foreach (var plugin in _plugins) {
|
||||
plugin.PostExport (parsedStory, runtimeStory);
|
||||
}
|
||||
}
|
||||
|
||||
List<IPlugin> _plugins;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e61aa8846eb6f40ed858857d1ea2225d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user