コード例 #1
0
        SquareView[,] squares; /*!< Tableau a deux dimensions des vues des cases */

        #endregion Fields

        #region Constructors

        /*!
        * \fn MainGame()
        * \brief Constructeur standard de la vue du jeu
                * \return
        */
        public MainGame()
        {
            wplayer = new WMPLib.WindowsMediaPlayer();
            InitializeComponent();
            controller = new Controller.Controller(this);
            log = new LogView(this);
            App.wrapper.setObserver(this);
            InitializeTabs();
            InitializeGameGrid();
            InitializePlayersView();
            MouseMove += onShootMouseMove;
            MouseUp += onShootMouseUp;
            shootLine = new Line();
            ShowCurrentPlayer();
            animateBackground();

            var path = System.IO.Path.Combine(
                 System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)
                , "sounds/theme.mp3");
            wplayer.URL = path;
            wplayer.controls.play();
            wplayer.PlayStateChange += new _WMPOCXEvents_PlayStateChangeEventHandler(player_PlayStateChange);
        }
コード例 #2
0
        public double sqLong;                      /*!< Longueur d'une case */


        /*!
         * \fn MainGame()
         * \brief Constructeur standard de la vue du jeu
         * \return
         */
        public MainGame()
        {
            wplayer = new WMPLib.WindowsMediaPlayer();
            InitializeComponent();
            controller = new Controller.Controller(this);
            log        = new LogView(this);
            App.wrapper.setObserver(this);
            InitializeTabs();
            InitializeGameGrid();
            InitializePlayersView();
            MouseMove += onShootMouseMove;
            MouseUp   += onShootMouseUp;
            shootLine  = new Line();
            ShowCurrentPlayer();
            animateBackground();

            var path = System.IO.Path.Combine(
                System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)
                , "sounds/theme.mp3");

            wplayer.URL = path;
            wplayer.controls.play();
            wplayer.PlayStateChange += new _WMPOCXEvents_PlayStateChangeEventHandler(player_PlayStateChange);
        }