示例#1
0
 public Ball( ref SpriteBatch spriteBatch, ref Texture2D texture, Vector2 position, Vector2 velocity, int timeDivideFactor)
 {
     this.spriteBatch = spriteBatch;
     this.texture = texture;
     this.position = position;
     boundingBox = new Rectangle((int) position.X, (int) position.Y, texture.Width,  texture.Width);
     this.velocity = new Velocity(velocity);
     this.timeDivideFactor = timeDivideFactor;
 }
示例#2
0
 public void setVelocity(Vector2 speed)
 {
     velocity = new Velocity(speed);
 }