Make particles bigger, move faster, and fall faster.

This commit is contained in:
UnknownShadow200 2015-09-20 07:34:01 +10:00
parent 12da9e5d7a
commit 43b247ea08
3 changed files with 5 additions and 5 deletions

View File

@ -36,7 +36,7 @@ namespace ClassicalSharp.Particles {
Matrix4 camera = game.View; Matrix4 camera = game.View;
Vector3 right = new Vector3( camera.Row0.X, camera.Row1.X, camera.Row2.X ); Vector3 right = new Vector3( camera.Row0.X, camera.Row1.X, camera.Row2.X );
Vector3 up = new Vector3( camera.Row0.Y, camera.Row1.Y, camera.Row2.Y ); Vector3 up = new Vector3( camera.Row0.Y, camera.Row1.Y, camera.Row2.Y );
float x = Size.X * 8, y = Size.Y * 8; float x = Size.X * 4, y = Size.Y * 4;
centre.Y += Size.Y / 2; centre.Y += Size.Y / 2;
p111 = Transform( -x, -y, ref centre, ref up, ref right ); p111 = Transform( -x, -y, ref centre, ref up, ref right );

View File

@ -83,7 +83,7 @@ namespace ClassicalSharp.Particles {
particleRec.V1 = (float)( rec.V1 + rnd.Next( 0, cellsCountY ) * elementYSize ); particleRec.V1 = (float)( rec.V1 + rnd.Next( 0, cellsCountY ) * elementYSize );
particleRec.U2 = particleRec.U1 + elementXSize; particleRec.U2 = particleRec.U1 + elementXSize;
particleRec.V2 = particleRec.V1 + elementYSize; particleRec.V2 = particleRec.V1 + elementYSize;
double life = 3 - rnd.NextDouble(); double life = 1.5 - rnd.NextDouble();
particles.Add( new TerrainParticle( game, pos, velocity, life, particleRec ) ); particles.Add( new TerrainParticle( game, pos, velocity, life, particleRec ) );
} }

View File

@ -5,8 +5,8 @@ namespace ClassicalSharp.Particles {
public sealed class TerrainParticle : Particle { public sealed class TerrainParticle : Particle {
const float gravity = 2.4f; const float gravity = 3.4f;
static Vector2 terrainSize = new Vector2( 1/16f, 1/16f ); static Vector2 terrainSize = new Vector2( 1/8f, 1/8f );
public TerrainParticle( Game game, Vector3 pos, Vector3 velocity, double lifetime, TextureRectangle rec ) public TerrainParticle( Game game, Vector3 pos, Vector3 velocity, double lifetime, TextureRectangle rec )
: base( game, pos, velocity, lifetime, rec ) { : base( game, pos, velocity, lifetime, rec ) {
@ -33,7 +33,7 @@ namespace ClassicalSharp.Particles {
Velocity.Y -= gravity * (float)delta; Velocity.Y -= gravity * (float)delta;
int startY = (int)Math.Floor( Position.Y ); int startY = (int)Math.Floor( Position.Y );
Position += Velocity * (float)delta; Position += Velocity * (float)delta * 3;
int endY = (int)Math.Floor( Position.Y ); int endY = (int)Math.Floor( Position.Y );
Utils.Clamp( ref Position.X, 0, game.Map.Width - 0.01f ); Utils.Clamp( ref Position.X, 0, game.Map.Width - 0.01f );
Utils.Clamp( ref Position.Z, 0, game.Map.Length - 0.01f ); Utils.Clamp( ref Position.Z, 0, game.Map.Length - 0.01f );