Beispiel #1
0
        protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
        {
            if (Ruleset.CreateResourceStore() is IResourceStore <byte[]> resources)
            {
                rulesetResourcesSkin = new ResourceStoreBackedSkin(resources, parent.Get <GameHost>(), parent.Get <AudioManager>());
            }

            return(base.CreateChildDependencies(parent));
        }
        protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
        {
            parentSource = parent.Get <ISkinSource>();
            parentSource.SourceChanged += OnSourceChanged;

            if (Ruleset.CreateResourceStore() is IResourceStore <byte[]> resources)
            {
                rulesetResourcesSkin = new ResourceStoreBackedSkin(resources, parent.Get <GameHost>(), parent.Get <AudioManager>());
            }

            // ensure sources are populated and ready for use before childrens' asynchronous load flow.
            UpdateSkinSources();

            return(base.CreateChildDependencies(parent));
        }