public Score(PuzzleBooble3dGame puzzlegame) : base(puzzlegame) { DepthStateEnabled = new DepthStencilState(); DepthStateEnabled.DepthBufferEnable = true; /* Enable the depth buffer */ //depthState.DepthBufferWriteEnable = true; /* When drawing to the screen, write to the depth buffer */ }
/// <summary> /// The main entry point for the application. /// </summary> static void Main(string[] args) { using (PuzzleBooble3dGame game = new PuzzleBooble3dGame()) { game.Run(); } }
public AimingArrow(PuzzleBooble3dGame game, Floor floor) : base(game) { Floor = floor; AngleZ = 0; Position = Floor.Position + new Vector3(Floor.WIDTH/2, 0, Ball.BALL_RADIUS); }
public Ball(PuzzleBooble3dGame game, Vector3 position, BallColor color) : base(game) { Color = color; Position = position; AnimationHelper = new BallAnimationHelper(this); }
public ComponentController(PuzzleBooble3dGame puzzleGame, Floor floor, AimingArrow arrow, BallGrid grid, FieldBounds bounds) : base(puzzleGame) { Floor = floor; Arrow = arrow; Grid = grid; Bounds = bounds; SetCurrentBall(new Ball(PuzzleBooble3dGame, GetCurrentBallPosition(), Ball.BallColor.Blue)); SetNextBall(new Ball(PuzzleBooble3dGame, Vector3.Zero, grid.GetRandomColor())); ThrowBallTimer = new Timer(); ThrowBallTimer.AutoReset = false; ThrowBallTimer.Interval = 10000; ThrowBallTimerRemainingTime = (float)ThrowBallTimer.Interval; ResetTimer(); }
public PuzzleBoobleGameComponent(PuzzleBooble3dGame puzzleGame) : base(puzzleGame) { }
public BallGrid(PuzzleBooble3dGame puzzleGame, Floor floor, FieldBounds bounds, Score score) : base(puzzleGame) { Floor = floor; Bounds = bounds; Bounds.Observer = this; CurrentScore = score; DeletedBalls = new List<Ball>(); Observer = new List<HangingBallsObserver>(); Balls = new List<List<Ball>>(NUMBER_OF_ROWS); for (int i = 0; i < NUMBER_OF_ROWS; i++) { Balls.Insert(i, new List<Ball>(i % 2 == 0 ? NUMBER_OF_COLUMNS_EVEN : NUMBER_OF_COLUMNS_ODD)); if (i % 2 == 0) { for (int j = 0; j < NUMBER_OF_COLUMNS_EVEN; j++) { Balls.ElementAt(i).Add(null); } } else { for (int j = 0; j < NUMBER_OF_COLUMNS_ODD; j++) { Balls.ElementAt(i).Add(null); } } } SetNewBallAtPosition(0, 0, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Red)); SetNewBallAtPosition(0, 1, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Red)); SetNewBallAtPosition(0, 2, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Yellow)); SetNewBallAtPosition(0, 3, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Yellow)); SetNewBallAtPosition(0, 4, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Blue)); SetNewBallAtPosition(0, 5, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Blue)); SetNewBallAtPosition(0, 6, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Green)); SetNewBallAtPosition(0, 7, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Green)); SetNewBallAtPosition(1, 0, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Red)); SetNewBallAtPosition(1, 1, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Red)); SetNewBallAtPosition(1, 2, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Yellow)); SetNewBallAtPosition(1, 3, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Yellow)); SetNewBallAtPosition(1, 4, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Blue)); SetNewBallAtPosition(1, 5, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Blue)); SetNewBallAtPosition(1, 6, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Green)); SetNewBallAtPosition(2, 0, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Blue)); SetNewBallAtPosition(2, 1, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Blue)); SetNewBallAtPosition(2, 2, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Green)); SetNewBallAtPosition(2, 3, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Green)); SetNewBallAtPosition(2, 4, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Red)); SetNewBallAtPosition(2, 5, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Red)); SetNewBallAtPosition(2, 6, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Yellow)); SetNewBallAtPosition(2, 7, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Yellow)); SetNewBallAtPosition(3, 0, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Blue)); SetNewBallAtPosition(3, 1, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Green)); SetNewBallAtPosition(3, 2, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Green)); SetNewBallAtPosition(3, 3, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Red)); SetNewBallAtPosition(3, 4, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Red)); SetNewBallAtPosition(3, 5, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Yellow)); SetNewBallAtPosition(3, 6, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Yellow)); SetNewBallAtPosition(0, 8, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Silver)); SetNewBallAtPosition(0, 9, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Silver)); SetNewBallAtPosition(0, 10, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.DarkGrey)); SetNewBallAtPosition(0, 11, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.DarkGrey)); SetNewBallAtPosition(1, 7, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Silver)); SetNewBallAtPosition(1, 8, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Silver)); SetNewBallAtPosition(1, 9, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Silver)); SetNewBallAtPosition(1, 10, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.DarkGrey)); SetNewBallAtPosition(2, 8, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Orange)); SetNewBallAtPosition(2, 9, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Orange)); SetNewBallAtPosition(2, 10, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Purple)); SetNewBallAtPosition(2, 11, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Purple)); SetNewBallAtPosition(3, 7, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Orange)); SetNewBallAtPosition(3, 8, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Orange)); SetNewBallAtPosition(3, 9, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Purple)); SetNewBallAtPosition(3, 10, new Ball(PuzzleBooble3dGame, Vector3.Zero, Ball.BallColor.Purple)); }
public ContentRepository(PuzzleBooble3dGame puzzleGame) : base(puzzleGame) { }
public Camera(PuzzleBooble3dGame game) : base(game) { }