Пример #1
0
 public void Render(TimeSpan elapsedGameTime)
 {
     PegPhysicsManager.Client().Render();
     BackgroundPlane.Render();
     CannonPlane.Client().Render();
     ChutesPlane.Client().Render();
     PegsPlane.Client().Render();
     OverlaysPlane.Render();
     CannonBallPlane.Client().Render();
 }
Пример #2
0
        public bool ShootBall(TouchType eventType, TouchRect touchBox, int x, int y, bool collide)
        {
            switch (eventType)
            {
            case TouchType.TouchUp:
                if (collide)
                {
                    CannonPlane.ShootBall();
                }
                break;

            case TouchType.TouchDown:
            case TouchType.TouchMove:
                if (collide)
                {
                    return(true);
                }
                break;
            }
            return(false);
        }
Пример #3
0
        public override void Init()
        {
            CreateObjects();
            base.Init();

            this.BackgroundPlane.Init();
            this.OverlaysPlane.Init();
            this.GameModel.Client().TouchManager.Init();

            Renderer.AddLayer(BackgroundPlane.Plane);
            Renderer.AddLayer(ChutesPlane.Client().BackPlane);
            Renderer.AddLayer(CannonBallPlane.Client().Plane);
            Renderer.AddLayer(CannonPlane.Client().Plane);
            Renderer.AddLayer(ChutesPlane.Client().FrontPlane);
            Renderer.AddLayer(PegsPlane.Client().Plane);
            Renderer.AddLayer(OverlaysPlane.Plane);

            if (PegPhysicsManager.Client().ShouldDraw)
            {
                //            Renderer.AddLayer(PegPhysicsManager.Plane);
            }
        }
Пример #4
0
 public override Cannon CreateCannon(CannonPlane cannonPlane)
 {
     return(new ClientCannon(GameBoard, cannonPlane));
 }
Пример #5
0
 public Cannon(GameBoard gameBoard, CannonPlane cannonPlane)
 {
     GameBoard    = gameBoard;
     CannonPlane  = cannonPlane;
     MovingCannon = false;
 }
Пример #6
0
 public static ClientCannonPlane Client(this CannonPlane obj)
 {
     return((ClientCannonPlane)obj);
 }
Пример #7
0
 public ClientCannon(GameBoard gameBoard, CannonPlane cannonPlane)
     : base(gameBoard, cannonPlane)
 {
 }