public IIOSystem CreatIoSystemFactory(IOSystemType currentIOType) { IOSystem.IOSystemFactory ioSystemFactory = new IOSystem.IOSystemFactory(); IIOSystem currentIoSystem = ioSystemFactory.GetIOSystem(currentIOType); currentIoSystem.IOSystemActions = IOActions; return(currentIoSystem); }
static void Main(string[] args) { var dataRogueGame = new DataRogueGame(); IIOSystem ioSystem = BLTTilesConfig.GetBLTTilesIOSystem(); var additionalComponents = typeof(Program).Assembly.GetTypes().Where(t => t.IsAssignableFrom(typeof(IEntityComponent))).ToList(); dataRogueGame.Run("SEED_DEBUG", GameRules.Rules, ioSystem, null, additionalComponents); }
// Start is called before the first frame update void Start() { if (IOConfiguration == null) { throw new InvalidOperationException("No IO Config"); } Debug.Log("CurrentIoSystemType :" + CurrentIoSystemType); currentIOSystem = IOConfiguration.CreatIoSystemFactory(CurrentIoSystemType); Debug.Log("CurrentIoSystemType :" + currentIOSystem.CurrentIOSystemType); currentIOSystem.Init(); }
public void Run(string seed, List <Type> eventRules, IIOSystem ioSystem = null, EntityDataProviders entityDataProviders = null, IList <Type> additionalComponentTypes = null) { Seed = seed; IOSystem = ioSystem ?? new RLNetConsoleIOSystem(RLNetConsoleIOSystem.DefaultConfiguration); entityDataProviders = entityDataProviders ?? EntityDataProviders.Default; InitialiseIOSystem(entityDataProviders); CreateAndRegisterSystems(entityDataProviders, additionalComponentTypes, IOSystem.Renderer, seed, IOSystem.Configuration); InitialiseState(); StartDataLoad(eventRules); RunRootConsole(ioSystem); }
private void RunRootConsole(IIOSystem ioSystem) { ioSystem.Run(); }