Beispiel #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();
        }
Beispiel #2
0
        public AttractModeScene()
            : base()
        {
            //canvas = new Canvas();
            //canvas.Initialize(Core.game.Content);
            //canvas.setSize(100, 100);
            //this.Add(canvas);

            player1 = new Player(null, Microsoft.Xna.Framework.PlayerIndex.One, typeof(HeartParticle));
            player1.Initialize(Core.game.Content);
            player1.StartEmitting();

            player2 = new Player(null, Microsoft.Xna.Framework.PlayerIndex.Two, typeof(HeartParticle));
            player2.Initialize(Core.game.Content);
            player2.StartEmitting();

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

            player1.StartEmitting();
            player2.StartEmitting();

            refreshTrigSums();
        }