public void Render(TimeSpan elapsedGameTime) { PegPhysicsManager.Client().Render(); BackgroundPlane.Render(); CannonPlane.Client().Render(); ChutesPlane.Client().Render(); PegsPlane.Client().Render(); OverlaysPlane.Render(); CannonBallPlane.Client().Render(); }
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); }
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); } }
public override Cannon CreateCannon(CannonPlane cannonPlane) { return(new ClientCannon(GameBoard, cannonPlane)); }
public Cannon(GameBoard gameBoard, CannonPlane cannonPlane) { GameBoard = gameBoard; CannonPlane = cannonPlane; MovingCannon = false; }
public static ClientCannonPlane Client(this CannonPlane obj) { return((ClientCannonPlane)obj); }
public ClientCannon(GameBoard gameBoard, CannonPlane cannonPlane) : base(gameBoard, cannonPlane) { }