Ejemplo n.º 1
0
        public PlayScene()
            : base(2, 2, 1)
        {
            //get next puzzle image
            string puzzleImage = JigsawCore.GetNextImage();

            canvas = new Canvas();
            canvas.Initialize(Core.game.Content);
            this.Add(canvas);

            completedPieces = new GameObjectGroup();
            carriedPieces = new GameObjectGroup();
            puzzle = new Puzzle(completedPieces, carriedPieces);
            puzzle.Create(puzzleImage, 250, canvas);

            this.Add(completedPieces);
            this.Add(puzzle);
            this.Add(carriedPieces);

            player1 = new Player(puzzle, PlayerIndex.One, typeof(SparkleParticle));
            player1.Initialize(Core.game.Content);

            player2 = new Player(puzzle, PlayerIndex.Two, typeof(SparkleParticle));
            player2.Initialize(Core.game.Content);

            this.Add(player2);
            this.Add(player1);

            idleTimer.NotifyMe();
        }
Ejemplo n.º 2
0
        public PlayState(ContentManager content)
        {
            background = content.Load <Texture2D> ("Images/background");

            camera      = new BreaddedCamera(640, 480);
            camera.Zoom = 2F;
            camera.MoveTo(new Vector2(160, 120));

            objects = new GameObjectGroup();

            player1 = new Player(PlayerNumber.ONE, content);
            objects.Add(player1);
            player2 = new Player(PlayerNumber.TWO, content);
            objects.Add(player2);
        }
Ejemplo n.º 3
0
 public Puzzle(GameObjectGroup completedPieces, GameObjectGroup attachedPieces)
     : base()
 {
     _completedPieces = completedPieces;
     _attachedPieces = attachedPieces;
 }