Ejemplo n.º 1
0
        private static ComponentData[] GetMultipleData <T>(GenesisSettings settings = null)
        {
            var provider = new ComponentDataProvider(
                new Type[]
            {
                typeof(T)
            });

            if (settings == null)
            {
                settings = ScriptableObject.CreateInstance <GenesisSettings>();
                var contextConfig = settings.CreateAndConfigure <ContextSettingsConfig>();
                contextConfig.ContextNames = new[]
                {
                    "Game",
                    "GameState"
                };

                var assembliesConfig = settings.CreateAndConfigure <AssembliesConfig>();
                assembliesConfig.DoUseWhitelistOfAssemblies = true;
                assembliesConfig.WhiteListedAssemblies      = new[]
                {
                    "EntitasRedux.Tests"
                };
            }

            provider.Configure(settings);

            return((ComponentData[])provider.GetData());
        }
Ejemplo n.º 2
0
        public void Setup()
        {
            _settings = ScriptableObject.CreateInstance <GenesisSettings>();
            var contextNamesConfig = _settings.CreateAndConfigure <ContextSettingsConfig>();

            contextNamesConfig.ContextNames = new[]
            {
                "Game",
                "GameState"
            };

            var assembliesConfig = _settings.CreateAndConfigure <AssembliesConfig>();

            assembliesConfig.WhiteListedAssemblies = new[]
            {
                "EntitasRedux.Tests"
            };
        }
Ejemplo n.º 3
0
        public void Setup()
        {
            _settings = ScriptableObject.CreateInstance <GenesisSettings>();

            var contextConfig = _settings.CreateAndConfigure <ContextSettingsConfig>();

            contextConfig.ContextNames = new[]
            {
                "ConfiguredContext"
            };
        }
Ejemplo n.º 4
0
        private static EntityIndexData[] GetData <T1, T2>(GenesisSettings _settings = null)
        {
            var provider = new EntityIndexDataProvider(
                new Type[]
            {
                typeof(T1),
                typeof(T2)
            });

            if (_settings == null)
            {
                _settings = ScriptableObject.CreateInstance <GenesisSettings>();
                var contextConfig = _settings.CreateAndConfigure <ContextSettingsConfig>();
                contextConfig.ContextNames = new[]
                {
                    "Game",
                    "GameState"
                };
            }

            provider.Configure(_settings);

            return((EntityIndexData[])provider.GetData());
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Configures preferences
 /// </summary>
 /// <param name="settings"></param>
 public void Configure(GenesisSettings settings)
 {
     _assembliesConfig = settings.CreateAndConfigure <AssembliesConfig>();
 }
Ejemplo n.º 6
0
 public override void Initialize(GenesisSettings settings)
 {
     _visualDebuggingConfig = settings.CreateAndConfigure <VisualDebuggingConfig>();
 }