//------------------------------------------------------------------------------------- // Class constructors public PlanetObject(BenchmarkGame game, Vector2 position, Texture2D texture, float size) : base(game, position, texture) { // Set the origin to the center of the planet Origin = new Vector2(texture.Width / 2, texture.Height / 2); Scale = new Vector2(size, size); }
public GamePage(string launchArguments) { this.InitializeComponent(); // Create the game. _game = XamlGame <BenchmarkGame> .Create(launchArguments, Window.Current.CoreWindow, this); }
//------------------------------------------------------------------------------------- // Class constructors public MoonObject(BenchmarkGame game, Texture2D texture, SpriteObject targetObject, float speed, float distance, float size, Color color) : base(game, Vector2.Zero, texture) { // Apply the constructor parameters _targetObject = targetObject; _speed = speed; _distance = distance; Scale = new Vector2(size, size); SpriteColor = color; // Set the origin to the center of the moon Origin = new Vector2(texture.Width / 2, texture.Height / 2); }