public GamePage(string launchArguments) { this.InitializeComponent(); // Create the game. _game = XamlGame<Game1>.Create(launchArguments, Window.Current.CoreWindow, this); }
public SmokeObject(Game1 game, Texture2D texture, Vector3 position, Vector3 scale) : base(game, texture, position, scale) { _game = game; // Have we already built the ground vertex array in a previous instance? if (_vertices == null) { // No, so build it now BuildVertices(); // Create a vertex buffer _vertexBuffer = new VertexBuffer(game.GraphicsDevice, typeof(VertexPositionNormalTexture), _vertices.Length, BufferUsage.WriteOnly); _vertexBuffer.SetData(_vertices); } // Set object properties ObjectTexture = texture; // Store the supplied start position _startPosition = position; _startScale = scale; // Reset the particle to an initial state ResetParticle(); }
public BulletObject2(Game1 game, Vector3 position, Model model, Vector3 angel) : base(game, position, model) { this.position = position; this.game = game; this.towards = angel; }
public BulletObject(Game1 game, Vector3 position, Model model, float angel) : base(game, position, model) { this.model = model; this.position = position; this.game = game; this.direction = angel; }
//------------------------------------------------------------------------------------- // Class constructors /* public Vector3 position, view, up; public Matrix projectionMatrix, viewMatrix; private float timeLapse = 0.0f;*/ // Game1 game; public CameraObject(Game1 game) : base(game) { // this.game = game; /* position = new Vector3(0.0f, 0.9f, 0.0f); view = new Vector3(0.0f, 0.9f, -0.5f); up = new Vector3(0.0f, 1.0f, 0.0f);*/ }
public Mode_Game(Game1 game) : base(game) { _game = game; _game.IsMouseVisible = true; // Indicate that the game is not yet active GameIsActive = false; }
public Ghost(Game1 game, Vector3 position, Model model) : base(game,position,model) { this.game = game; this.x = position.X; this.y = position.Y; this.z = position.Z; thurder = game.SoundEffects["Thurder"].CreateInstance(); thurder.Volume = 1.0f; thurder2 = game.SoundEffects["Thurder2"].CreateInstance(); thurder2.Volume = 1.0f; }
//------------------------------------------------------------------------------------- // Class constructors public GroundObject(Game1 game, Texture2D texture) : base(game) { Scale = Vector3.One*1000; PositionY = 0; // Have we already built the ground vertex array in a previous instance? if (_vertices == null) { // No, so build it now BuildVertices(); } // Set other object properties ObjectTexture = texture; }
public CorpseFlower(Game1 game, Vector3 position, Model model) : base(game,position,model) { this.game = game; this.position = position; }
public HealthObject(Game1 game, Vector3 position, Model model) : base(game, position, model) { this.game = game; this.position = position; }
public Mode_Menu(Game1 game) : base(game) { _game = game; }
public Mode_HighScores(Game1 game) : base(game) { _game = game; }