public void BigAndSmallApartCapsuleTest() { ICapsule notes = new BigCapsule(0, Note.GetNote(0, Note.Pitch.A4, 4, 85), new SmallCapsule(25, new Note(Note.Pitch.B4, 4, 85))); Note onNote1 = notes.GetReadiedMinion(0) as Note; Assert.AreEqual(Note.Pitch.A4, onNote1.NotePitch); Assert.IsFalse(notes.CanDispose()); OffNote offNote1 = notes.GetReadiedMinion(24) as OffNote; Assert.IsFalse(notes.CanDispose()); Assert.AreEqual(Note.Pitch.A4, offNote1.NotePitch); Note onNote2 = notes.GetReadiedMinion(25) as Note; Assert.AreEqual(Note.Pitch.B4, onNote2.NotePitch); Assert.IsTrue(notes.CanDispose()); }
public void SmallAndBigOverlapCapsuleTest() { ICapsule notes = new BigCapsule(0, new SmallCapsule(0, new Note(Note.Pitch.A4, 4, 85)), Note.GetNote(12, Note.Pitch.B4, 4, 85)); Note onNote1 = notes.GetReadiedMinion(0) as Note; Assert.AreEqual(Note.Pitch.A4, onNote1.NotePitch); Assert.IsFalse(notes.CanDispose()); Note onNote2 = notes.GetReadiedMinion(12) as Note; Assert.AreEqual(Note.Pitch.B4, onNote2.NotePitch); Assert.IsFalse(notes.CanDispose()); //OffNote offNote1 = notes.GetReadiedMinion (24) as OffNote; //Assert.AreEqual (Note.Pitch.A4, offNote1.NotePitch); OffNote offNote2 = notes.GetReadiedMinion(36) as OffNote; Assert.AreEqual(Note.Pitch.B4, offNote2.NotePitch); Assert.IsTrue(notes.CanDispose()); }
private void LoadOffNotes() { for (int i = 0; i < 5; i++) { Texture2D texture = (Texture2D)Nova_DataBase.GetResource("NOTE_OFF_" + (i + 1).ToString()); Vector2 pos = new Vector2(i * stepSpace + Nova_Functions.View.Width / 2 - ((numberOfSteps * stepSpace) / 2), Nova_Functions.View.Height - texture.Height); OffNote on = new OffNote(); on.pos = pos; on.texture = texture; on.colision = Nova_Functions.CreateRectangle(pos, texture); offNotes[i] = on; } }