public GamePage(string launchArguments)
        {
            this.InitializeComponent();

            // Create the game.
            _game = XamlGame <MultipleModesGame> .Create(launchArguments, Window.Current.CoreWindow, this);
        }
        public Mode_Game(MultipleModesGame game)
            : base(game)
        {
            _game = game;

            // Indicate that the game is not yet active
            GameIsActive = false;
        }
        //-------------------------------------------------------------------------------------
        // Class constructors

        internal SquareObject(MultipleModesGame game, Texture2D texture)
            : base(game, Vector2.Zero, texture)
        {
            // Store a strongly-typed reference to the game
            _game = game;

            // Set a random position
            PositionX = GameHelper.RandomNext(0, _game.GraphicsDevice.Viewport.Bounds.Width);
            PositionY = GameHelper.RandomNext(0, _game.GraphicsDevice.Viewport.Bounds.Height);

            // Set the origin
            Origin = new Vector2(texture.Width, texture.Height) / 2;

            // Set a random movement speed
            _moveSpeed = GameHelper.RandomNext(2.0f) + 2;

            // Set a random rotation speed
            _rotateSpeed = GameHelper.RandomNext(-5.0f, 5.0f);

            // Set the speed multiplier to zero so that the objects gradually accelerate to their set speed
            _moveSpeedMultiplier = 0;

            Scale = new Vector2(0.7f);
        }
 public Mode_Settings(MultipleModesGame game)
     : base(game)
 {
     _game = game;
 }
Beispiel #5
0
 public Mode_Credits(MultipleModesGame game)
     : base(game)
 {
     _game = game;
 }
 public Mode_Menu(MultipleModesGame game)
     : base(game)
 {
     _game = game;
 }
 public Mode_HighScores(MultipleModesGame game)
     : base(game)
 {
     _game = game;
 }