Пример #1
0
 protected override void LoadContent()
 {
     // Create a new SpriteBatch, which can be used to draw textures.
     spriteBatch = new SpriteBatch(GraphicsDevice);
     texStar     = Content.Load <Texture2D>("star");
     texBall     = Content.Load <Texture2D>("ball");
     ballSprite  = new SpriteObject(texBall, Vector2(200, 0), new Vector2(10.0f, 0.0f)); // create two sprites
     starSprite  = new SpriteObject(texStar, Vector2.Zero, new Vector2(10.0f, 10.0f));
 }
Пример #2
0
 Vector2 starPosition = Vector2.Zero; Vector2 ballPosition = new Vector2(200, 0); Vector2 starSpeed = new Vector2(10.0f, 10.0f); Vector2 ballSpeed = new Vector2(10.0f, 0.0f); protected override void LoadContent( )
 {
     spriteBatch = new SpriteBatch(GraphicsDevice); texStar = Content.Load <Texture2D> ("star"); texBall = Content.Load <Texture2D> ("ball"); ballSprite = new SpriteObject(texBall, Vector2(200, 0), new Vector2(10.0f, 0.0f)); starSprite = new SpriteObject(texStar, Vector2.Zero, new Vector2(10.0f, 10.0f));
 }