/*public void PickupEffect(Vector2 position, Vector2 velocity, PickupType pt, PickupSize ps) * { * if (pt == PickupType.Crystals) * { * for (int a = 0; a < 1; a++) * { * float angle = 0; * float angleVel = 0; * int ttl = 200; * float sizeVel = 0; * float alphaVel = 0.05F; * float size = ps == PickupSize.Small ? 1f : 1.5f; * Vector4 color = new Vector4(0.5F, 0.5F, 0.7F, 1f); * GenerateNewBackParticle(Textures.light, position, velocity, angle, angleVel, color, size, ttl, sizeVel, alphaVel); * } * } * else * { * for (int a = 0; a < 1; a++) * { * float angle = 0; * float angleVel = 0; * int ttl = 200; * float sizeVel = 0; * float alphaVel = 0.05F; * float size = 1f; * Vector4 color = new Vector4(0.5F, 0.5F, 0.5F, 1f); * GenerateNewBackParticle(Textures.light, position, velocity, angle, angleVel, color, size, ttl, sizeVel, alphaVel); * } * } * }*/ private ParticleDerbis GenerateNewColorDerbisParticle(int type, bool isWrecks, bool isFire, bool isFireExplosion, Vector2 position, Vector2 velocity, float angle, float angularVelocity, Vector4 color, float size, int ttl, float sizeVel, float alphaVel) { ParticleDerbis particle = new ParticleDerbis(type, isWrecks, isFire, isFireExplosion, position, velocity, angle, angularVelocity, color, size, ttl, sizeVel, alphaVel); colorDerbisParticle.Add(particle); return(particle); }
public void ShipWrecks(ShipType shipType, Vector2 shipvelocity, Vector2 position, float angle) { float x = (float)Math.Cos(angle + 1.57F); float y = (float)Math.Sin(angle + 1.57F); float x1 = (float)Math.Cos(angle); float y1 = (float)Math.Sin(angle); Vector2[] velocity2 = new Vector2[4]; velocity2[0] = new Vector2(x1 / 4F, y1 / 4F); //Down velocity2[1] = new Vector2(-x1 / 4F, -y1 / 4F); //Up velocity2[2] = new Vector2(x / 4F, y / 4F); //Left velocity2[3] = new Vector2(-x / 4F, -y / 4F); //Right if (shipType == ShipType.HumanHuge1) { for (int a = 0; a < 3; a++) { Vector2 velocity = (a == 0 ? velocity2[a] : a == 1 ? velocity2[3] : velocity2[1]) + shipvelocity / 2F; float angleVel = (float)core.random.Next(-100, 100) / 500000F; Vector4 color = new Vector4(0.5F, 0.5F, 0.5F, 1); int ttl = 7000; float size = 1F; float sizeVel = 0.0F; float alphaVel = 0.001F; ParticleDerbis particle = new ParticleDerbis(shipType, a, position, velocity, angle, angleVel, color, size, ttl, sizeVel, alphaVel); fonWrecksParticle.Add(particle); } } else if (shipType == ShipType.EnemyMotherShip) { for (int a = 0; a < 3; a++) { Vector2 velocity = (a == 0 ? velocity2[a] : a == 1 ? velocity2[1] : velocity2[3]) + shipvelocity / 2F; float angleVel = (float)core.random.Next(-100, 100) / 500000F; Vector4 color = new Vector4(0.5F, 0.5F, 0.5F, 1); int ttl = 7000; float size = 1F; float sizeVel = 0.0F; float alphaVel = 0.001F; ParticleDerbis particle = new ParticleDerbis(shipType, a, position, velocity, angle, angleVel, color, size, ttl, sizeVel, alphaVel); fonWrecksParticle.Add(particle); } } else if (shipType == ShipType.CivMotherShip1) { for (int a = 0; a < 3; a++) { Vector2 velocity = (a == 0 ? velocity2[0] : a == 1 ? velocity2[1] : velocity2[2]) + shipvelocity / 2F; float angleVel = (float)core.random.Next(-100, 100) / 500000F; Vector4 color = new Vector4(0.5F, 0.5F, 0.5F, 1); int ttl = 7000; float size = 1F; float sizeVel = 0.0F; float alphaVel = 0.001F; ParticleDerbis particle = new ParticleDerbis(shipType, a, position, velocity, angle, angleVel, color, size, ttl, sizeVel, alphaVel); fonWrecksParticle.Add(particle); } } else if (shipType == ShipType.HumanMotherShip1) { for (int a = 0; a < 2; a++) { Vector2 velocity = velocity2[a] + shipvelocity / 2F; float angleVel = (float)core.random.Next(-100, 100) / 500000F; Vector4 color = new Vector4(0.5F, 0.5F, 0.5F, 1); int ttl = 7000; float size = 1F; float sizeVel = 0.0F; float alphaVel = 0.001F; ParticleDerbis particle = new ParticleDerbis(shipType, a, position, velocity, angle, angleVel, color, size, ttl, sizeVel, alphaVel); fonWrecksParticle.Add(particle); } } else if (shipType == ShipType.HumanLargeStation1) { for (int a = 0; a < 2; a++) { Vector2 velocity = (a == 0 ? velocity2[3] : velocity2[2]) + shipvelocity / 2F; float angleVel = (float)core.random.Next(-100, 100) / 500000F; Vector4 color = new Vector4(0.5F, 0.5F, 0.5F, 1); int ttl = 7000; float size = 1F; float sizeVel = 0.0F; float alphaVel = 0.001F; ParticleDerbis particle = new ParticleDerbis(shipType, a, position, velocity, angle, angleVel, color, size, ttl, sizeVel, alphaVel); fonWrecksParticle.Add(particle); } } }