Esempio n. 1
0
 protected override void Initialize()
 {
     spriteBatch = new SpriteBatch(GraphicsDevice);
     cam = new TargetCamera(new Vector3(0, 0, 100), Vector3.Zero, GraphicsDevice);
     sph = new Sphere(new Vector3(30, 0, 0), 10, Color.Violet, GraphicsDevice);
     sph2 = new Sphere(new Vector3(-30, 0, 0), 10, Color.LightGreen, GraphicsDevice);
     drawables.Add(sph);
     drawables.Add(sph2);
 }
Esempio n. 2
0
 public ParticleBody(Vector3 position, Vector3 acceleration, Vector3 velocity, float drag, float density, Color color, GraphicsDevice graphic, float radius = 0.5f)
 {
     Density = density;
     Color = color;
     Position = position;
     Acceleration = acceleration;
     Velocity = velocity;
     Drag = drag;
     particle.Mass = MathHelper.PI4div3 * 0.5f * Density;
     sphere = new Sphere(position, radius, color, graphic);
 }