コード例 #1
0
 private void setupProviderStep()
 {
     AddStep("setup provider", () =>
     {
         Child = new RulesetSkinProvidingContainer(Ruleset.Value.CreateInstance(), Beatmap.Value.Beatmap, Beatmap.Value.Skin)
                 .WithChild(requester = new SkinRequester());
     });
 }
コード例 #2
0
        public void TestEarlyAddedSkinRequester()
        {
            Texture textureOnLoad = null;

            AddStep("setup provider", () =>
            {
                var rulesetSkinProvider = new RulesetSkinProvidingContainer(Ruleset.Value.CreateInstance(), Beatmap.Value.Beatmap, Beatmap.Value.Skin);

                rulesetSkinProvider.Add(requester = new SkinRequester());

                requester.OnLoadAsync += () => textureOnLoad = requester.GetTexture("test-image");

                Child = rulesetSkinProvider;
            });

            AddAssert("requester got correct initial texture", () => textureOnLoad != null);
        }
コード例 #3
0
 public void SetUp() => Schedule(() =>
 {
     Add(new SkinProvidingContainer(userSource = new UserSkinSource())
         .WithChild(new SkinProvidingContainer(beatmapSource = new BeatmapSkinSource())
                    .WithChild(requester = new SkinRequester())));
 });
コード例 #4
0
 public void SetUp() => Schedule(() =>
 {
     Add(new SkinProvidingContainer(source1            = new SkinSource())
         .WithChild(new SkinProvidingContainer(source2 = new SkinSource())
                    .WithChild(requester = new SkinRequester())));
 });