Ejemplo n.º 1
0
 public Particle2D( ITexture2D texture, Vector2 position, Vector2 velocity, float angle, float angularVelocity, Color overlayColor, float size, TimeSpan ttl )
 {
     sprite = new Sprite ( texture );
     world = new World2 ( position, new Vector2 ( size ), texture.Size () / 2, angle, texture.Size () / 2 );
     sprite.OverlayColor = overlayColor;
     Velocity = velocity;
     AngularVelocity = angularVelocity;
     TTL = ttl;
 }
Ejemplo n.º 2
0
 public PerformanceSpriteNode( ITexture2D texture )
     : base(texture)
 {
     rotateUnit = ( ( float ) ( random.NextDouble () - random.NextDouble () ) ) * 10.0f;
     World.RotationCenter = texture.Size () / 2;
     World.Translate = new Vector2 ( random.Next ( 800 ), random.Next ( 600 ) );
 }
Ejemplo n.º 3
0
 public Bullet( ITexture2D texture )
     : base(texture)
 {
     Alignment = SpriteAlignment.CenterMiddle;
     World.RotationCenter = texture.Size () / 2;
 }