コード例 #1
0
        /// <summary>
        /// Initialise l'état des différents objets du jeu.
        /// </summary>
        public void Init()
        {
            this.Ball   = new Ball();
            this.Ground = new PlayGround();

            this.Winner = null;

            this.Scores             = new Scores();
            this.Scores.MatchEnded += (sender, args) => {
                this.Winner = new EndMatch(args.Winner);
            };

            this.LeftRacquet  = new Racquet(Racquet.RacquetSides.Left);
            this.RightRacquet = new Racquet(Racquet.RacquetSides.Right);
        }
コード例 #2
0
ファイル: Pong.cs プロジェクト: shadetva/Cours-2e-annee
        /// <summary>
        /// Initialise l'état des différents objets du jeu.
        /// </summary>
        public void Init()
        {
            this.Ball = new Ball();
            this.Ground = new PlayGround();

            this.Winner = null;

            this.Scores = new Scores();
            this.Scores.MatchEnded += (sender, args) => {
                this.Winner = new EndMatch(args.Winner);
            };

            this.LeftRacquet = new Racquet(Racquet.RacquetSides.Left);
            this.RightRacquet = new Racquet(Racquet.RacquetSides.Right);
        }