Exemplo n.º 1
0
 public ScoreboardQuad(BasketballGame basketballGame, TouchCamera camera, ScoreboardView scoreboardView)
     : base(basketballGame)
 {
     this.basketballGame = basketballGame;
     this.camera         = camera;
     this.scoreboardView = scoreboardView;
 }
Exemplo n.º 2
0
        protected override void Initialize()
        {
            this.homeTeam  = new Team("HOME");
            this.guestTeam = new Team("GUEST");
            this.clock     = new Clock();

            this.camera = new TouchCamera {
                Bounds = new BoundingBox(new Vector3(-195), new Vector3(195))
            };
            this.camera.LookAt(new Vector3(135, 40, 0), new Vector3(200, 40, 0), Vector3.Up);
            this.camera.Perspective(MathHelper.PiOver4, 800 / 480f, 1f, 600);

            var scoreboardView = new ScoreboardView(this, this.homeTeam, this.guestTeam, this.clock);

            this.Components.Add(scoreboardView);
            this.Components.Add(new ScoreboardQuad(this, this.camera, scoreboardView));
            this.Components.Add(new Court(this, this.camera));

            this.ResetGraphicDeviceState();
            TouchPanel.EnabledGestures = GestureType.FreeDrag | GestureType.Pinch;

            AccelerometerHelper.Instance.ReadingChanged += this.OnAccelerometerHelperReadingChanged;
            AccelerometerHelper.Instance.Active          = true;

            base.Initialize();
        }
Exemplo n.º 3
0
        protected override void Initialize()
        {
            this.homeTeam = new Team("HOME");
            this.guestTeam = new Team("GUEST");
            this.clock = new Clock();

            this.camera = new TouchCamera { Bounds = new BoundingBox(new Vector3(-195), new Vector3(195)) };
            this.camera.LookAt(new Vector3(135, 40, 0), new Vector3(200, 40, 0), Vector3.Up);
            this.camera.Perspective(MathHelper.PiOver4, 800 / 480f, 1f, 600);

            var scoreboardView = new ScoreboardView(this, this.homeTeam, this.guestTeam, this.clock);
            this.Components.Add(scoreboardView);
            this.Components.Add(new ScoreboardQuad(this, this.camera, scoreboardView));
            this.Components.Add(new Court(this, this.camera));

            this.ResetGraphicDeviceState();
            TouchPanel.EnabledGestures = GestureType.FreeDrag | GestureType.Pinch;

            AccelerometerHelper.Instance.ReadingChanged += this.OnAccelerometerHelperReadingChanged;
            AccelerometerHelper.Instance.Active = true;

            base.Initialize();
        }
Exemplo n.º 4
0
 public Court(Game game, TouchCamera camera)
     : base(game)
 {
     this.camera = camera;
 }
Exemplo n.º 5
0
 public Court(Game game, TouchCamera camera)
     : base(game)
 {
     this.camera = camera;
 }