Exemple #1
0
        void wplayer_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent NewState)
        {
            string val = "";

            switch (NewState.newState)
            {
            case 1:
                val = "Stopped";
                break;

            case 2:
                val = "Paused";
                break;

            case 8:
                val = "Media Ended";
                //playList.removeItem(preMovie);
                if (!spellCast)
                {
                    //playList.appendItem(loopMovie);
                    pbStrokes.Visible = true;
                    wandHandler.StartTracking();

                    axWindowsMediaPlayer1.Visible = false;
                }
                else if (spellCast && !shownEnd)
                {
                    // TODO: moved this to the place where the spell is cast
                    axWindowsMediaPlayer1.Visible = true;
                    playList.appendItem(postMovie);
                    pbStrokes.Visible = false;
                    shownEnd          = true;
                }
                else
                {
                    Close();
                }
                count++;
                break;

            case 9:
                val = "Transitioning";
                break;

            case 12:
                val = "last";
                break;
            }
        }
Exemple #2
0
        public Werewolf()
        {
            InitializeComponent();

            List <String> spellNames = new List <string>();

            //spellNames.Add("Aguamenti");
            spellNames.Add("Reparo");
            spellNames.Add("Metelojinx");
            spellNames.Add("Tarantallegra");
            spellNames.Add("Locomotor");
            spellNames.Add("Incendio");
            spellNames.Add("WingardiumLeviosa");
            wandHandler = new WandHandler(pbStrokes, spellNames, delegate { castSpell(); });
            wandHandler.StartTracking();

            this.KeyPreview = true;
            this.KeyPress  += new System.Windows.Forms.KeyPressEventHandler(HandleKeys);

            sound = new System.Media.SoundPlayer(@"C:\Users\CLARISSA RAMOS\Documents\GitHub\wiiwandz\HarryParty\media\sounds\werewolf_howling_2.wav");
        }
Exemple #3
0
        public Werewolf()
        {
            InitializeComponent();

            var spellNames = new List<string>()
            {
                "Reparo",
                "Metelojinx",
                "Tarantallegra",
                "Locomotor",
                "Incendio",
                "WingardiumLeviosa"
            };
            //spellNames.Add("Aguamenti");
            wandHandler = new WandHandler(pbStrokes, spellNames, delegate { castSpell(); });
            wandHandler.StartTracking();

            KeyPreview = true;
            KeyPress += new KeyPressEventHandler(HandleKeys);

            sound = new SoundPlayer(SOUND);
        }