示例#1
0
        public void SetCountInreases()
        {
            IStage         stage         = new Stage();
            IInstrument    guitar        = new Guitar();
            IInstrument    drums         = new Drums();
            ISet           set2          = new Medium("Settadfkhshdk");
            ISong          song2         = new Song("Nothing", new TimeSpan(0, 3, 0));
            ISet           set1          = new Short("Set1");
            ISong          song1         = new Song("Something", new System.TimeSpan(0, 2, 0));
            IPerformer     performer1    = new Performer("Stavri", 12);
            IPerformer     performer2    = new Performer("Genadi", 13);
            ISetController setController = new SetController(stage);

            performer2.AddInstrument(drums);
            performer1.AddInstrument(guitar);
            set1.AddPerformer(performer1);
            set1.AddSong(song1);
            set2.AddPerformer(performer2);
            set2.AddSong(song2);
            stage.AddSet(set1);
            stage.AddSet(set2);

            var result = setController.PerformSets();

            Assert.That(result.Contains("1. Settadfkhshdk"));
        }
示例#2
0
 public InternalBuyInfo()
 {
     Add(new GenericBuyInfo("Lute", typeof(Lute), Lute.GetSBPurchaseValue(), 50, 0x0EB3, 0));
     Add(new GenericBuyInfo("Drums", typeof(Drums), Drums.GetSBPurchaseValue(), 50, 0x0E9C, 0));
     Add(new GenericBuyInfo("Harp", typeof(Harp), Harp.GetSBPurchaseValue(), 50, 0x0EB1, 0));
     Add(new GenericBuyInfo("Tambourine", typeof(Tambourine), Tambourine.GetSBPurchaseValue(), 50, 0x0E9E, 0));
 }
示例#3
0
        void SendMessages(Drums newState, XInput.GamepadEx state)
        {
            if (device == null)
            {
                return;
            }
            var channel = Midi.Enums.Channel.Channel10;

            foreach (Drums d in Enum.GetValues(typeof(Drums)))
            {
                var note = DrumNoteMap[d];
                if (newState.HasFlag(d) && !drumState.HasFlag(d))
                {
                    var velocity = VelocityFunctions[d](state);
                    if (velocity > 127)
                    {
                        velocity = 127;
                    }
                    if (velocity < 32)
                    {
                        velocity = 32;
                    }
                    device.SendNoteOn(channel, (Midi.Enums.Pitch)note, velocity);
                }
                else if (!newState.HasFlag(d) && drumState.HasFlag(d))
                {
                    device.SendNoteOff(channel, (Midi.Enums.Pitch)note, 0);
                }
            }
        }
示例#4
0
        private void Mon_OnStateChanged(XInput.GamepadEx state)
        {
            var drums = HitDrums(state.wButtons);

            SendMessages(drums, state);
            drumState = drums;
        }
示例#5
0
        public void SetControllerPerformsSetsInTheCorrectOrder()
        {
            var set1 = new Short("Set1");
            var set2 = new Medium("Set2");

            var performer1 = new Performer("Ivan", 20);
            var performer2 = new Performer("Gosho", 24);
            var performer3 = new Performer("Pesho", 19);

            var guitar     = new Guitar();
            var drums      = new Drums();
            var microphone = new Microphone();

            var song1 = new Song("Song1", new TimeSpan(0, 1, 2));

            performer1.AddInstrument(guitar);
            performer2.AddInstrument(drums);
            performer3.AddInstrument(microphone);

            this.stage.AddPerformer(performer1);
            this.stage.AddPerformer(performer2);
            this.stage.AddPerformer(performer3);

            this.stage.AddSong(song1);

            set1.AddSong(song1);
            set1.AddPerformer(performer2);
            set1.AddPerformer(performer3);

            this.stage.AddSet(set1);
            this.stage.AddSet(set2);

            Assert.That(setController.PerformSets(), Is.EqualTo(this.PerformSets()));
        }
示例#6
0
 public InternalSellInfo()
 {
     Add(typeof(Lute), Lute.GetSBSellValue());
     Add(typeof(Drums), Drums.GetSBSellValue());
     Add(typeof(Harp), Harp.GetSBSellValue());
     Add(typeof(Tambourine), Tambourine.GetSBSellValue());
 }
示例#7
0
        public void ControllerEventHandler(XInput.GamepadEx state)
        {
            var drums = HitDrums(state.wButtons);

            SendMessages(drums, state);
            drumState = drums;
        }
            public InternalBuyInfo()
            {
                Add(new GenericBuyInfo("Hatchet", typeof(Hatchet), Hatchet.GetSBPurchaseValue(), 50, 0xF43, 0));
                Add(new GenericBuyInfo("Saw", typeof(Saw), Saw.GetSBPurchaseValue(), 50, 0x1034, 0));

                Add(new GenericBuyInfo("Club", typeof(Club), Club.GetSBPurchaseValue(), 25, 0x13B4, 0));
                Add(new GenericBuyInfo("Shepherd's Crook", typeof(ShepherdsCrook), ShepherdsCrook.GetSBPurchaseValue(), 25, 0xE81, 0));
                Add(new GenericBuyInfo("Quarter Staff", typeof(QuarterStaff), QuarterStaff.GetSBPurchaseValue(), 25, 0xE89, 0));
                Add(new GenericBuyInfo("Gnarled Staff", typeof(GnarledStaff), GnarledStaff.GetSBPurchaseValue(), 25, 0x13F8, 0));
                Add(new GenericBuyInfo("Black Staff", typeof(BlackStaff), BlackStaff.GetSBPurchaseValue(), 25, 0xDF0, 0));

                Add(new GenericBuyInfo("Wooden Shield", typeof(WoodenShield), WoodenShield.GetSBPurchaseValue(), 25, 7034, 0));
                Add(new GenericBuyInfo("Wooden Kite Shield", typeof(WoodenKiteShield), WoodenKiteShield.GetSBPurchaseValue(), 25, 7033, 0));

                Add(new GenericBuyInfo("Lute", typeof(Lute), Lute.GetSBPurchaseValue(), 50, 0x0EB3, 0));
                Add(new GenericBuyInfo("Drums", typeof(Drums), Drums.GetSBPurchaseValue(), 50, 0x0E9C, 0));
                Add(new GenericBuyInfo("Harp", typeof(Harp), Harp.GetSBPurchaseValue(), 50, 0x0EB1, 0));
                Add(new GenericBuyInfo("Tambourine", typeof(Tambourine), Tambourine.GetSBPurchaseValue(), 50, 0x0E9E, 0));

                Add(new GenericBuyInfo("Scorp", typeof(Scorp), Scorp.GetSBPurchaseValue(), 50, 0x10E7, 0));
                Add(new GenericBuyInfo("Smoothing Plane", typeof(SmoothingPlane), SmoothingPlane.GetSBPurchaseValue(), 50, 0x1032, 0));
                Add(new GenericBuyInfo("Drawing Knife", typeof(DrawKnife), DrawKnife.GetSBPurchaseValue(), 50, 0x10E4, 0));
                Add(new GenericBuyInfo("Froe", typeof(Froe), Froe.GetSBPurchaseValue(), 50, 0x10E5, 0));
                Add(new GenericBuyInfo("Hammer", typeof(Hammer), Hammer.GetSBPurchaseValue(), 50, 0x102A, 0));
                Add(new GenericBuyInfo("Inshave", typeof(Inshave), Inshave.GetSBPurchaseValue(), 50, 0x10E6, 0));
                Add(new GenericBuyInfo("Jointing Plane", typeof(JointingPlane), JointingPlane.GetSBPurchaseValue(), 50, 0x1030, 0));
                Add(new GenericBuyInfo("Wooden Plane", typeof(WoodenPlane), WoodenPlane.GetSBPurchaseValue(), 50, 0x102C, 0));
                Add(new GenericBuyInfo("Dovetail Saw", typeof(DovetailSaw), DovetailSaw.GetSBPurchaseValue(), 50, 0x1028, 0));
            }
        public void WearDownWorks()
        {
            ISet  set  = new Short("izpulnenie");
            ISong song = new Song("despacito", new TimeSpan(0, 02, 01));

            set.AddSong(song);

            IPerformer  performer  = new Performer("ivan", 15);
            IInstrument instrument = new Drums();

            performer.AddInstrument(instrument);

            set.AddPerformer(performer);
            IStage stage = new Stage();

            stage.AddSet(set);

            ISetController setController = new SetController(stage);

            var expected = 80;

            setController.PerformSets();

            var actual = instrument.Wear;

            Assert.AreEqual(expected, actual);
        }
        public void PerformSets_CanPerform_InstrumentWearsDown()
        {
            IStage stage = new Stage();

            ISet set = new Long("short");

            set.AddSong(new Song("s2", new TimeSpan(0, 1, 0)));

            IPerformer performer = new Performer("pesho", 100);

            IInstrument instrument = new Drums();

            performer.AddInstrument(instrument);

            set.AddPerformer(performer);

            stage.AddSet(set);

            ISetController setController = new SetController(stage);

            setController.PerformSets();

            double actualResult   = instrument.Wear;
            double expectedResult = 80;

            Assert.That(actualResult, Is.EqualTo(expectedResult));
        }
        public static Instrument GetInstrument(string instrument)
        {
            Instrument inst;

            switch (instrument.ToLower())
            {
            case "guittar":
                inst = new Guittar();
                break;

            case "bax":
                inst = new Bax();
                break;

            case "drums":
                inst = new Drums();
                break;

            case "piano":
                inst = new Piano();
                break;

            case "trumpet":
                inst = new Trumpet();
                break;

            default:
                throw new ArgumentException("No existe un instrumento de tipo " + instrument);
            }
            return(inst);
        }
示例#12
0
        public void TestSetPerform()
        {
            var set = new Short("Set1");
            var instrumentGuitar = new Guitar();
            var instrumentDrums  = new Drums();
            var performer        = new Performer("Ivan", 23);
            var song1            = new Song("Song1", new TimeSpan(0, 1, 1));

            this.stage.AddSet(set);
            performer.AddInstrument(instrumentGuitar);
            performer.AddInstrument(instrumentDrums);
            set.AddPerformer(performer);
            set.AddSong(song1);


            var actual   = this.setController.PerformSets();
            var expected = $@"1. Set1:
-- 1. Song1 (01:01)
-- Set Successful";

            var actualInstrumentWear   = instrumentGuitar.Wear;
            var expectedInstrumentWear = 40;

            Assert.That(actual, Is.EqualTo(expected));
            Assert.That(actualInstrumentWear, Is.EqualTo(expectedInstrumentWear));
        }
            public InternalSellInfo()
            {
                Add(typeof(Hatchet), Hatchet.GetSBSellValue());
                Add(typeof(Saw), Saw.GetSBSellValue());

                Add(typeof(Scorp), Scorp.GetSBSellValue());
                Add(typeof(SmoothingPlane), SmoothingPlane.GetSBSellValue());
                Add(typeof(DrawKnife), DrawKnife.GetSBSellValue());
                Add(typeof(Froe), Froe.GetSBSellValue());
                Add(typeof(Hammer), Hammer.GetSBSellValue());
                Add(typeof(Inshave), Inshave.GetSBSellValue());
                Add(typeof(JointingPlane), JointingPlane.GetSBSellValue());
                Add(typeof(WoodenPlane), WoodenPlane.GetSBSellValue());
                Add(typeof(DovetailSaw), DovetailSaw.GetSBSellValue());

                Add(typeof(Lute), Lute.GetSBSellValue());
                Add(typeof(Drums), Drums.GetSBSellValue());
                Add(typeof(Harp), Harp.GetSBSellValue());
                Add(typeof(Tambourine), Tambourine.GetSBSellValue());

                Add(typeof(Club), Club.GetSBSellValue());
                Add(typeof(ShepherdsCrook), ShepherdsCrook.GetSBSellValue());
                Add(typeof(QuarterStaff), QuarterStaff.GetSBSellValue());
                Add(typeof(GnarledStaff), GnarledStaff.GetSBSellValue());
                Add(typeof(BlackStaff), BlackStaff.GetSBSellValue());

                Add(typeof(WoodenShield), WoodenShield.GetSBSellValue());
                Add(typeof(WoodenKiteShield), WoodenKiteShield.GetSBSellValue());

                /*
                 *              Add( typeof( WoodenBox ), 7 );
                 *              Add( typeof( SmallCrate ), 5 );
                 *              Add( typeof( MediumCrate ), 6 );
                 *              Add( typeof( LargeCrate ), 7 );
                 *              Add( typeof( WoodenChest ), 15 );
                 *
                 *              Add( typeof( LargeTable ), 10 );
                 *              Add( typeof( Nightstand ), 7 );
                 *              Add( typeof( YewWoodTable ), 10 );
                 *              Add( typeof( WritingTable ), 9 );
                 *
                 *              Add( typeof( Throne ), 24 );
                 *              Add( typeof( WoodenThrone ), 6 );
                 *              Add( typeof( Stool ), 6 );
                 *              Add( typeof( FootStool ), 6 );
                 *
                 *              Add( typeof( FancyWoodenChairCushion ), 12 );
                 *              Add( typeof( CushionedWoodenChair ), 10 );
                 *              Add( typeof( WoodenChair ), 8 );
                 *              Add( typeof( BambooChair ), 6 );
                 *              Add( typeof( WoodenBench ), 6 );
                 */
            }
示例#14
0
        public void RegisterSetTest()
        {
            ISet set = new Short("Set1");

            IStage stage = new Stage();

            int      hours1        = 0;
            int      minutes1      = 1;
            int      seconds1      = 2;
            TimeSpan songDuration1 = new TimeSpan(hours1, minutes1, seconds1);

            ISong song = new Song("Song1", songDuration1);

            int      hours2        = 0;
            int      minutes2      = 1;
            int      seconds2      = 2;
            TimeSpan songDuration2 = new TimeSpan(hours2, minutes2, seconds2);

            ISong song2 = new Song("Song2", songDuration2);


            IPerformer performer1 = new Performer("Gosho", 24);
            Drums      drum       = new Drums();

            performer1.AddInstrument(drum);

            IPerformer performer2 = new Performer("Pesho", 19);
            Guitar     guitar     = new Guitar();
            Drums      drum2      = new Drums();

            performer2.AddInstrument(guitar);

            set.AddPerformer(performer1);
            set.AddPerformer(performer2);
            set.AddSong(song);
            set.AddSong(song2);

            stage.AddSet(set);
            stage.AddSong(song);
            stage.AddSong(song2);
            stage.AddPerformer(performer1);
            stage.AddPerformer(performer2);

            SetController setController = new SetController(stage);

            string expected = "1. Set1:" + Environment.NewLine + "-- 1. Song1 (01:02)" + Environment.NewLine + "-- 2. Song2 (01:02)" + Environment.NewLine + "-- Set Successful";

            string actual = setController.PerformSets();

            Assert.That(actual, Is.EqualTo(expected));
        }
示例#15
0
        public void CheckNotPerform()
        {
            IPerformer  performer  = new Performer("Ivan", 23);
            IInstrument instrument = new Drums();
            ISong       song       = new Song("I am a Dreamer!", new TimeSpan(0, 4, 0));

            performer.AddInstrument(instrument);
            this.set.AddPerformer(performer);
            this.stage.AddSet(set);

            string actualResult   = this.controller.PerformSets();
            string expectedResult = "1. Test:\r\n-- Did not perform";

            Assert.AreEqual(actualResult, expectedResult);
        }
        public void CheckIfSetWasntSuccessful()
        {
            IStage         stage         = new Stage();
            ISetController setController = new SetController(stage);
            IPerformer     performer     = new Performer("ivan", 15);

            ISet set = new Short("izpulnenie");

            stage.AddSet(set);

            IInstrument instrument = new Drums();

            performer.AddInstrument(instrument);

            stage.AddPerformer(performer);

            Assert.That(setController.PerformSets().EndsWith("-- Did not perform"));
        }
示例#17
0
        public void CheckInstrumentWearDown()
        {
            IPerformer  performer  = new Performer("Ivan", 23);
            IInstrument instrument = new Drums();
            double      wear       = instrument.Wear;
            ISong       song       = new Song("I am a Dreamer!", new TimeSpan(0, 4, 0));

            performer.AddInstrument(instrument);
            this.set.AddPerformer(performer);
            this.set.AddSong(song);

            this.stage.AddSet(set);
            this.stage.AddSong(song);
            this.stage.AddPerformer(performer);

            this.controller.PerformSets();
            Assert.AreNotEqual(instrument.Wear, wear);
        }
示例#18
0
        public void TestPerformSetsSetThrowsError()
        {
            ISet shortSet  = new Short("shortSet");
            ISet longSet   = new Long("longSet");
            ISet mediumSet = new Medium("mediumSet");

            IInstrument drum       = new Drums();
            IInstrument guitar     = new Guitar();
            IInstrument microphone = new Microphone();

            IPerformer nakov = new Performer("Nakov", 10);
            IPerformer vladi = new Performer("Vladi", 10);
            IPerformer bojo  = new Performer("Bojo", 10);

            nakov.AddInstrument(drum);
            nakov.AddInstrument(guitar);
            nakov.AddInstrument(microphone);

            vladi.AddInstrument(guitar);
            vladi.AddInstrument(drum);

            bojo.AddInstrument(microphone);

            ISong song  = new Song("NewSong", new TimeSpan(0, 5, 5));
            ISong song2 = new Song("NewSong2", new TimeSpan(52, 7, 5));
            ISong song3 = new Song("NewSong3", new TimeSpan(1, 1, 5));
            ISong song4 = new Song("NewSong4", new TimeSpan(5, 5, 5));

            shortSet.AddPerformer(bojo);
            shortSet.AddPerformer(nakov);
            shortSet.AddPerformer(vladi);

            mediumSet.AddPerformer(vladi);
            mediumSet.AddPerformer(nakov);
            mediumSet.AddPerformer(bojo);

            longSet.AddPerformer(vladi);
            longSet.AddPerformer(bojo);
            longSet.AddPerformer(nakov);

            shortSet.AddSong(song);

            Assert.Throws <InvalidOperationException>(() => { shortSet.AddSong(song2); });
        }
        public void CheckInstrument_AfterPerformance_ShouldBeWornDown()
        {
            ISet        set        = new Short("Seta");
            IPerformer  performer  = new Performer("Jay-Z", 15);
            IInstrument instrument = new Drums();
            ISong       song       = new Song("Vijda mu se kraq", new System.TimeSpan(00, 01, 20));

            performer.AddInstrument(instrument);
            set.AddPerformer(performer);
            set.AddSong(song);

            this.stage.AddSet(set);
            this.controller.PerformSets();

            var expected = 80;
            var actual   = instrument.Wear;

            Assert.That(actual, Is.EqualTo(expected));
        }
示例#20
0
        public void DidNotPerformTest()
        {
            ISet set = new Short("Set1");

            IStage stage = new Stage();

            int      hours        = 0;
            int      minutes      = 1;
            int      seconds      = 2;
            TimeSpan songDuration = new TimeSpan(hours, minutes, seconds);

            ISong song = new Song("Song1", songDuration);

            stage.AddSet(set);
            stage.AddSong(song);

            IPerformer performer1 = new Performer("Gosho", 24);
            Drums      drum       = new Drums();

            performer1.AddInstrument(drum);

            IPerformer performer2 = new Performer("Pesho", 19);
            Guitar     guitar     = new Guitar();

            performer1.AddInstrument(guitar);

            set.AddPerformer(performer1);
            set.AddPerformer(performer2);

            SetController setController = new SetController(stage);

            set.AddSong(song);

            string expected = "1. Set1:" + Environment.NewLine + "-- Did not perform";

            string actual = setController.PerformSets();

            Assert.That(actual, Is.EqualTo(expected));
        }
        public void Test3()
        {
            var set1 = new Long("Set1");
            var ivan = new Performer("Ivan", 23);

            IInstrument instrument = new Drums();

            ivan.AddInstrument(instrument);
            set1.AddPerformer(ivan);
            set1.AddSong(new Song("Song1", new TimeSpan(00, 01, 00)));

            var stage = new Stage();

            stage.AddSet(set1);

            var sc = new SetController(stage);

            sc.PerformSets();
            var actual   = instrument.Wear;
            var expected = 80;

            Assert.That(actual, Is.EqualTo(expected));
        }
示例#22
0
 void SendMessages(Drums newState, XInput.GamepadEx state)
 {
     foreach (Drums d in Enum.GetValues(typeof(Drums)))
     {
         var note = DrumNoteMap[d](newState);
         if (newState.HasFlag(d) && !drumState.HasFlag(d))
         {
             var velocity = VelocityFunctions[d](state);
             if (velocity > 127)
             {
                 velocity = 127;
             }
             if (velocity < 32)
             {
                 velocity = 32;
             }
             OnNoteOn?.Invoke(Channel, (Midi.Enums.Pitch)note, velocity);
         }
         else if (!newState.HasFlag(d) && drumState.HasFlag(d))
         {
             OnNoteOff?.Invoke(Channel, (Midi.Enums.Pitch)note);
         }
     }
 }
示例#23
0
        public void TestPerformSetsSetSuccessful()
        {
            ISet set = new Short("NewSet");

            IInstrument drum = new Drums();

            IPerformer performer = new Performer("Perofrmer1", 10);

            performer.AddInstrument(drum);

            ISong song = new Song("NewSong", new TimeSpan(0, 5, 5));

            set.AddPerformer(performer);
            set.AddSong(song);

            stage.AddSet(set);

            stage.AddPerformer(performer);
            stage.AddSong(song);

            string result = setController.PerformSets();

            Assert.AreEqual(result, "1. NewSet:\r\n-- 1. NewSong (05:05)\r\n-- Set Successful");
        }
示例#24
0
        public void TestBothPerforms()
        {
            this.stage.AddSet(this.set1);
            IPerformer  performer   = new Performer("Lili Ivanova", 150);
            IInstrument instrument  = new Microphone();
            IInstrument instrument2 = new Guitar();

            performer.AddInstrument(instrument);
            performer.AddInstrument(instrument2);
            ISong song = new Song("Vetrove", new TimeSpan(0, 4, 30));

            IPerformer  performer1  = new Performer("Avicci", 30);
            IInstrument instrument1 = new Drums();

            performer1.AddInstrument(instrument1);
            ISong song1 = new Song("Hey Brother", new TimeSpan(0, 3, 59));

            this.set.AddPerformer(performer);
            this.set.AddSong(song);
            this.set.AddPerformer(performer1);
            this.set.AddSong(song1);

            this.setController.PerformSets();
            this.setController.PerformSets();
            this.setController.PerformSets();
            this.setController.PerformSets();
            this.setController.PerformSets();
            this.setController.PerformSets();
            this.setController.PerformSets();
            this.setController.PerformSets();
            this.setController.PerformSets();
            this.setController.PerformSets();
            var result = this.setController.PerformSets();

            Assert.That(result, Is.EqualTo("1. set1:\r\n-- Did not perform\r\n2. set2:\r\n-- Did not perform"));
        }
示例#25
0
    // Use this for initialization
    void Awake()
    {
        instance = this;

        rBPM   = 60f / BPM;
        oldBPM = BPM;
        songs  = new List <Song>();

        drums  = GetComponentInChildren <Drums>();
        synth  = GetComponentInChildren <Synth>();
        melody = GetComponentInChildren <Melody>();

        //load all songs
        int  count = 1;
        bool run   = true;

        while (run)
        {
            string path = Path.Combine(Application.streamingAssetsPath, "Songs/" + count.ToString() + ".txt");

            if (File.Exists(path))
            {
                string[] lines   = File.ReadAllLines(path);
                Song     newSong = new Song();

                for (int i = 0; i < lines.Length; ++i)
                {
                    if (lines[i].Length == 0)
                    {
                        break;
                    }

                    if (lines[i][0] == '_')
                    {
                        int x = i + 1;
                        while (x < lines.Length && lines[x].Length > 0 && lines[x][0] != '_')
                        {
                            switch (lines[i])
                            {
                            case "_synth":
                                newSong.synth.Add(lines[x]);
                                //Debug.Log("Added synth");
                                break;

                            case "_melody":
                                newSong.melody.Add(lines[x]);
                                //Debug.Log("Added melody");
                                break;

                            case "_drums":
                                newSong.drums.Add(lines[x]);
                                //Debug.Log("Added drums");
                                break;
                            }
                            x++;
                        }
                    }
                }

                songs.Add(newSong);
            }
            else
            {
                run = false;
            }

            count++;
        }

        if (songs.Count == 0)
        {
            enabled = false;
            return;
        }

        Song s = SelectRandomSong();

        DoSong(s);
    }
示例#26
0
        public void TestPerformSetsSetSuccessfulMultipeSetsInstrumentsPerformersAndSongs()
        {
            ISet shortSet  = new Short("shortSet");
            ISet longSet   = new Long("longSet");
            ISet mediumSet = new Medium("mediumSet");

            IInstrument drum       = new Drums();
            IInstrument guitar     = new Guitar();
            IInstrument microphone = new Microphone();

            IPerformer nakov = new Performer("Nakov", 10);
            IPerformer vladi = new Performer("Vladi", 10);
            IPerformer bojo  = new Performer("Bojo", 10);

            nakov.AddInstrument(drum);
            nakov.AddInstrument(guitar);
            nakov.AddInstrument(microphone);

            vladi.AddInstrument(guitar);
            vladi.AddInstrument(drum);

            bojo.AddInstrument(microphone);

            ISong song  = new Song("NewSong", new TimeSpan(0, 5, 5));
            ISong song2 = new Song("NewSong2", new TimeSpan(0, 7, 5));
            ISong song3 = new Song("NewSong3", new TimeSpan(0, 1, 5));
            ISong song4 = new Song("NewSong4", new TimeSpan(0, 0, 5));

            shortSet.AddPerformer(bojo);
            shortSet.AddPerformer(nakov);
            shortSet.AddPerformer(vladi);

            mediumSet.AddPerformer(vladi);
            mediumSet.AddPerformer(nakov);
            mediumSet.AddPerformer(bojo);

            longSet.AddPerformer(vladi);
            longSet.AddPerformer(bojo);
            longSet.AddPerformer(nakov);


            shortSet.AddSong(song);
            shortSet.AddSong(song2);
            shortSet.AddSong(song3);
            shortSet.AddSong(song4);

            mediumSet.AddSong(song);
            mediumSet.AddSong(song2);
            mediumSet.AddSong(song3);
            mediumSet.AddSong(song4);

            longSet.AddSong(song);
            longSet.AddSong(song2);
            longSet.AddSong(song3);
            longSet.AddSong(song4);

            stage.AddSet(shortSet);
            stage.AddSet(mediumSet);
            stage.AddSet(longSet);

            stage.AddPerformer(nakov);
            stage.AddPerformer(bojo);
            stage.AddPerformer(vladi);

            stage.AddSong(song);
            stage.AddSong(song2);
            stage.AddSong(song3);
            stage.AddSong(song4);

            string result = setController.PerformSets();

            Assert.AreNotEqual(result, "1. shortSet:\r\n-- 1. NewSong (05:05)\r\n-- Set Successful\r\n2. mediumSet:\r\n-- Did not perform\r\n3. longSet:\r\n-- Did not perform");
        }
示例#27
0
 public override bool Test(Sim a, Drums target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
 {
     return(true);
 }
示例#28
0
 public override string GetInteractionName(Sim actor, Drums target, InteractionObjectPair iop)
 {
     return(base.GetInteractionName(actor, target, new InteractionObjectPair(Drums.PlayForTips.Singleton, target)));
 }
 public IDrums CreateDrums(string make, string model, decimal price, string color, int width, int height)
 {
     IDrums drums = new Drums(make, model, price, color, width, height);
     return drums;
 }
        public IDrums CreateDrums(string make, string model, decimal price, string color, int width, int height)
        {
            var drums = new Drums(make, model, price, color, width, height);

            return(drums);
        }
示例#31
0
        private static void InvokeReward(Mobile from, SkillInfo skillInfo)
        {
            //Gump is problematic, would need to track if they have recieved their
            //reward for each skill, and recheck each login incase they closed the gump without accepting etc
            //Just give them a reward directly for now.
            Item rewardItem = null;

            switch (skillInfo.SkillID)
            {
            case 0:     // alchemy
                rewardItem = new MortarPestle();
                break;

            case 7:     // Blacksmithy
                rewardItem = new SmithHammer();
                break;

            case 8:     // Bowcraft/fletching
                rewardItem = new Bow();
                break;

            case 11:     // Carpentry
                rewardItem = new SmoothingPlane();
                break;

            case 23:     // Inscription
                rewardItem = new ScribesPen();
                break;

            case 25:     // Magery
                rewardItem = new Spellbook();
                (rewardItem as Spellbook).Content = ulong.MaxValue;
                break;

            case 34:     // Tailoring
                rewardItem = new SewingKit();
                break;

            case 35:     // Animal Taming
                rewardItem = new ShepherdsCrook();
                break;

            /* case 44: //Lumberjacking
             *   rewardItem = new Hatchet();
             *   break;
             * case 45: // Mining
             *   rewardItem = new Pickaxe();
             *   break;*/

            //Bardic skills
            case 9:
            case 15:
            case 22:
            case 29:
                rewardItem = new Drums();
                break;

            //"Thieving" skills
            case 21:
            case 28:
            case 33:
            case 47:
                rewardItem = new Cloak();
                break;
            }
            if (rewardItem != null)
            {
                rewardItem.Hue      = MythikStaticValues.GetGMRewardHue();
                rewardItem.LootType = LootType.Blessed;
                if (rewardItem.DefaultName != null)
                {
                    rewardItem.Name = from.RawName + "'s " + rewardItem.DefaultName;
                }
                from.PlaceInBackpack(rewardItem);
                from.SendAsciiMessage("You have recieved an item for becoming a Grand Master.");
            }
            else
            {
                from.SendAsciiMessage("You have recieved nothing but a sense of self worth for your efforts becoming a Grand Master.");
            }
        }