コード例 #1
0
ファイル: AraniaExumai.cs プロジェクト: yi520520/wiiwandz
        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;
            }
        }
コード例 #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");
        }
コード例 #3
0
ファイル: Werewolf.cs プロジェクト: brunoksato/wiiwandz
        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);
        }