private void load(BosuRulesetConfigManager config, ISampleStore samples) { config.BindWith(BosuRulesetSetting.PlayerModel, playerModel); jump = samples.Get("jump"); doubleJump = samples.Get("double-jump"); }
private void load(ISampleStore samples) { jump = samples.Get("jump"); doubleJump = samples.Get("double-jump"); shootSample = samples.Get("shoot"); Sprite.BindValueChanged(onSpriteChanged, true); }
private void load(ISampleStore samples) { bassSample = (SampleChannelBass)samples.Get("long.mp3"); var length = bassSample.CurrentAmplitudes.FrequencyAmplitudes.Length; Children = new Drawable[] { sample = new DrawableSample(bassSample), new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { new Container { RelativeSizeAxes = Axes.Both, Children = new Drawable[] { leftChannel = new Box { RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.CentreRight, }, rightChannel = new Box { RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.CentreLeft, } } }, }, new Drawable[] { amplitudeBoxes = new Container { RelativeSizeAxes = Axes.Both, ChildrenEnumerable = Enumerable.Range(0, length) .Select(i => new Box { RelativeSizeAxes = Axes.Both, RelativePositionAxes = Axes.X, Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, Width = 1f / length, X = (float)i / length }) }, } } }, }; }
private void load(ISampleStore samples) { Children = new Drawable[] { sample = new DrawableSample(samples.Get("long.mp3")), new GridContainer { RelativeSizeAxes = Axes.Both, Content = new[] { new Drawable[] { new Container { RelativeSizeAxes = Axes.Both, Children = new Drawable[] { leftChannel = new Box { RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.CentreRight, }, rightChannel = new Box { RelativeSizeAxes = Axes.Both, Anchor = Anchor.Centre, Origin = Anchor.CentreLeft, } } }, }, new Drawable[] { amplitudeBoxes = new Container { RelativeSizeAxes = Axes.Both, ChildrenEnumerable = Enumerable.Range(0, ChannelAmplitudes.AMPLITUDES_SIZE) .Select(i => new Box { RelativeSizeAxes = Axes.Both, RelativePositionAxes = Axes.X, Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, Width = 1f / ChannelAmplitudes.AMPLITUDES_SIZE, X = (float)i / ChannelAmplitudes.AMPLITUDES_SIZE }) }, } } }, }; }
private void load(ISampleStore samples) { samples.Volume.Value = 0.5f; DrawableSample sample; AddInternal(sample = new DrawableSample(samples.Get("long.mp3"))); var channel = sample.GetChannel(); channel.Looping = true; channel.Play(); }
private void load(TextureStore textures, ISampleStore samples) { RelativeSizeAxes = Axes.Both; InternalChildren = new Drawable[] { particles = new Container <DeathParticle> { RelativeSizeAxes = Axes.Both, Masking = true }, circle = new Sprite { Size = new Vector2(IWannaExtensions.TILE_SIZE * 5), Origin = Anchor.Centre, Scale = Vector2.Zero, Alpha = 0, AlwaysPresent = true, Texture = textures.Get("death-circle") }, tint = new Box { RelativeSizeAxes = Axes.Both, Colour = Color4.Red, Alpha = 0 }, blackFlash = new Box { RelativeSizeAxes = Axes.Both, Colour = Color4.Black, Alpha = 0 }, sprite = new Sprite { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, Size = new Vector2(0.8f), FillMode = FillMode.Fit, Alpha = 0, }, letterbox = new LetterboxOverlay { Alpha = 0, }, deathSample = new DrawableSample(samples.Get("death")), }; sprite.Texture = textures.Get("game-over"); }
private void load(ITrackStore tracks, ISampleStore samples) { track = new DrawableTrack(tracks.Get("sample-track.mp3")); sample = new DrawableSample(samples.Get("long.mp3")); if (withMixer) { InternalChild = new DrawableAudioMixer { Children = new Drawable[] { track, sample } } } ; else { InternalChildren = new Drawable[] { track, sample } }; }
/// <summary> /// Initializes a new instance of the <see cref="UserViewModel" /> class. /// </summary> /// <param name="store">The store.</param> public UserViewModel(ISampleStore store) { this.SelectedUser = new UserDetailViewModel(); this.Users = new List <User> { new User { Name = "Roy" } }; this.AddCommand = ReactiveCommand.Create( () => store.State.Dispatch( new AddUserAction { Name = this.SelectedUser.Name, LastName = this.SelectedUser.LastName, BirthDate = this.SelectedUser.BirthDate })); }
private void load(ISampleStore samples) { Anchor = Anchor.CentreLeft; Origin = Anchor.Centre; Position = new Vector2(120.0f, .0f); animation = new TextureAnimation { Origin = Anchor.Centre, Anchor = Anchor.Centre, }; animation.AddFrame(textures.Get("redbird-upflap"), 200.0f); animation.AddFrame(textures.Get("redbird-downflap"), 200.0f); animation.AddFrame(textures.Get("redbird-midflap"), 200.0f); AddInternal(animation); AddInternal(flapSound = new DrawableSample(samples.Get("wing.ogg"))); Size = animation.Size; Scale = new Vector2(0.45f); }
/// <summary> /// Construct a new legacy skin instance. /// </summary> /// <param name="skin">The model for this skin.</param> /// <param name="storage">A storage for looking up files within this skin using user-facing filenames.</param> /// <param name="resources">Access to raw game resources.</param> /// <param name="configurationStream">An optional stream containing the contents of a skin.ini file.</param> protected LegacySkin(SkinInfo skin, [CanBeNull] IResourceStore <byte[]> storage, [CanBeNull] IStorageResourceProvider resources, [CanBeNull] Stream configurationStream) : base(skin, resources, configurationStream) { if (storage != null) { var samples = resources?.AudioManager?.GetSampleStore(storage); if (samples != null) { samples.PlaybackConcurrency = OsuGameBase.SAMPLE_CONCURRENCY; } Samples = samples; Textures = new TextureStore(resources?.CreateTextureLoaderStore(storage)); (storage as ResourceStore <byte[]>)?.AddExtension("ogg"); } // todo: this shouldn't really be duplicated here (from ManiaLegacySkinTransformer). we need to come up with a better solution. hasKeyTexture = new Lazy <bool>(() => this.GetAnimation( lookupForMania <string>(new LegacyManiaSkinConfigurationLookup(4, LegacyManiaSkinConfigurationLookups.KeyImage, 0))?.Value ?? "mania-key1", true, true) != null); }
internal Metric(string name, ISampleStore store) { Name = name; this.store = store; }
private void load(ISampleStore samples, AudioManager audioManager) { this.samples = samples; this.audioManager = audioManager; }
private void load(TouhouRulesetConfigManager config, ISampleStore samples) { config.BindWith(TouhouRulesetSetting.PlayerModel, playerModel); shoot = samples.Get("shoot"); }
internal Metric (string name, ISampleStore store, Func<object> sampleFunc) : this (name, store) { sample_func = sampleFunc; }
private void checkAggregateVolume(ISampleStore store, double expected) { Assert.AreEqual(expected, store.AggregateVolume.Value); }
public FallbackSampleStore(ISampleStore primary, ISampleStore fallback) { this.primary = primary; this.fallback = fallback; }
private void load(BosuRulesetConfigManager config, ISampleStore samples) { config.BindWith(BosuRulesetSetting.PlayerModel, playerModel); }
private void load(ISampleStore samples) { enteringSample = samples.Get("entering"); }
public MetricsCollection(string uniqueUserId, ISampleStore store) { AnonymousUserId = uniqueUserId; Store = store; }
private void load(ISampleStore samples) { this.samples = samples; }
public FallbackSampleStore(ISampleStore primary, ISampleStore secondary) { this.primary = primary; this.secondary = secondary; }
internal Metric (string name, ISampleStore store) { Name = name; this.store = store; }
internal Metric(string name, ISampleStore store, Func <object> sampleFunc) : this(name, store) { sample_func = sampleFunc; }
private void checkAggregateVolume(ISampleStore store, double expected) { Assert.AreEqual(expected, ((IAggregateAudioAdjustment)store).AggregateVolume.Value); }
internal Metric(string name, ISampleStore store, object value) : this(name, store) { PushSample(value); }
public ResourceStoreBackedSkin(IResourceStore <byte[]> resources, GameHost host, AudioManager audio) { textures = new TextureStore(host.CreateTextureLoaderStore(new NamespacedResourceStore <byte[]>(resources, @"Textures"))); samples = audio.GetSampleStore(new NamespacedResourceStore <byte[]>(resources, @"Samples")); }
private void load(ISampleStore samples) { AddInternal(sample = new DrawableSample(samples.Get("long.mp3"))); }
private void load(OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game, ISampleStore samples) { menuMusic = config.GetBindable <bool>(OsuSetting.MenuMusic); BeatmapSetInfo setInfo = null; if (!menuMusic.Value) { var sets = beatmaps.GetAllUsableBeatmapSets(); if (sets.Count > 0) { setInfo = beatmaps.QueryBeatmapSet(s => s.ID == sets[RNG.Next(0, sets.Count - 1)].ID); } } if (setInfo == null) { setInfo = beatmaps.QueryBeatmapSet(b => b.Hash == menu_music_beatmap_hash); if (setInfo == null) { // we need to import the default menu background beatmap setInfo = beatmaps.Import(new ZipArchiveReader(game.Resources.GetStream(@"Tracks/circles.osz"), "circles.osz")).Result; setInfo.Protected = true; beatmaps.Update(setInfo); } } introBeatmap = beatmaps.GetWorkingBeatmap(setInfo.Beatmaps[0]); track = introBeatmap.Track; if (config.Get <bool>(OsuSetting.MenuVoice)) { welcome = samples.Get(@"welcome"); } }
public SampleAcquisitionUseCase(ISampleStore sampleStore, IUserStore userStore) { _sampleStore = sampleStore; _userStore = userStore; }
internal Metric (string name, ISampleStore store, object value) : this (name, store) { PushSample (value); }