public void initialize( ContentUtil content, DanceSequenceProtocol protocol, float beatTimeInMS, float uiSpeed) { this.beatTimeInMs = beatTimeInMS; this.initHud(content, uiSpeed); this.errorSound = new Sound("hud/error_move", content); this.successSound = null;// new Sound("hud/success_move"); this.seqSuccessSound = new RandomSound("hud/perfect", 10, content); float bpms = 1 / beatTimeInMS; foreach (DanceSequence.Input input in protocol.handicaps) { if (!this.hud.ContainsKey(input.handicap)) continue; this.hud[input.handicap].prerecord(input.startTime(bpms), Color.Orange); } this.transitions.initialize(content, protocol, beatTimeInMS); }
public override void initialize(Sound click, Sound select, ScaledTexture texDeactivated, ScaledTexture texActivated) { base.initialize(click, select, texDeactivated, texActivated); this.active = false; this.selectedIndex = 0; foreach (MenuItem item in this.items) { item.initialize(click, select, texDeactivated, texActivated); } }
public virtual void initialize(Sound click, Sound select, ScaledTexture texDeactivated, ScaledTexture texActivated) { this.clickSound = click; this.selectSound = select; this._nextScene = false; this.selected = false; this.texDeactivated = texDeactivated; this.texActivated = texActivated; }
public void initialize(ContentUtil content, SceneActivationParameters parameters) { this.input = new ExplicitInputState(); this.next = false; this.exit = false; this.firstUpdate = true; this.background = content.load<Texture2D>("menu/background01"); this.clickSound = new Sound("menu/click", content); this.selectSound = new Sound("menu/select", content); if (null == this.backgroundSong || this.backgroundSong.stoppedPlaying()) this.backgroundSong = new Song("menu/backgroundsong", content, 120f); ScaledTexture[][] buttonTextures = this.loadButtonTextures(content); foreach (MenuItem item in this.items) { int texIndex = SystemRef.nextRandomInt(0, 4); item.initialize(this.clickSound, this.selectSound, buttonTextures[texIndex][0], buttonTextures[texIndex][1]); } this.items[0].select(); }