public Mode_Game(MultipleModesGame game)
            : base(game)
        {
            _game = game;

            // Indicate that the game is not yet active
            GameIsActive = false;
        }
Exemplo n.º 2
0
        // Constructor
        public GamePage()
        {
            InitializeComponent();

            _game = XamlGame <MultipleModesGame> .Create("", this);

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }
Exemplo n.º 3
0
        //-------------------------------------------------------------------------------------
        // 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.3f);
        }
 public Mode_Credits(MultipleModesGame game)
     : base(game)
 {
     _game = game;
 }
Exemplo n.º 5
0
 public Mode_Menu(MultipleModesGame game)
     : base(game)
 {
     _game = game;
 }
 public Mode_Settings(MultipleModesGame game)
     : base(game)
 {
     _game = game;
 }
 public Mode_HighScores(MultipleModesGame game)
     : base(game)
 {
     _game = game;
 }