public override void Hit() { EffectCone.CreateSmokeCone(position, TKMath.GetAngle(velocity), 0.4f + 0.6f * charge, 0.8f, 3, 1, Map); Map.AddEffect(new EffectRing(position, 1.6f + charge * 1.5f, 0.5f + 0.5f * charge, Color.White, Map)); base.Hit(); }
public EffectPlayerHit(Player p, float dir, float size, Map m) : base(m) { size = MathHelper.Clamp(size, 0.2f, 2f); tileset = new Tileset(p.playerTileset); mesh = new Mesh(p.sprite.Mesh.Vertices, p.sprite.Mesh.UV); mesh.Tileset = p.playerTileset; mesh.Reset(); mesh.Translate(p.Position); mesh.Scale(p.Size); mesh.Scale(2f); mesh.Scale(p.dir, 1); mesh.FillColor = true; EffectCone.CreateBloodCone(p.Position, dir, 45f, (int)(20 * size), map); EffectCone.CreateBloodCone(p.Position, dir, 360f, (int)(10 * size), map); /* * Random rng = new Random(); * Vector2 ringPos = new Vector2((float)rng.NextDouble() - 0.5f, * (float)rng.NextDouble() - 0.5f); * map.AddEffect(new EffectRing(p.position + ringPos, 2f + 2f * size, 0.7f, Color.White, map)); *///NO RING PLZ Vector2 spikeDir = TKMath.GetAngleVector(dir) * 2 * size; map.AddEffect(new EffectSpike(p.Position - spikeDir, p.Position + spikeDir, 2f * size, 0.4f, Color.White, map)); }
public override void Hit() { EffectCone.CreateSmokeCone(position, direction - 180, 0.4f, 0.5f, 4, 2, Map); if (hitActor == null) { Map.AddEffect(new EffectRing(position, 2f, 0.5f, Color.White, Map)); } base.Hit(); }
public static void CreateExplosion(Vector2 position, float size, Map map) { Random rng = new Random(); for (int i = 0; i < 3; i++) { float dir = (float)rng.NextDouble() * 360f; float s = (float)rng.NextDouble() * 0.1f + 0.4f; s *= size; map.AddEffect(new EffectRockSmoke(position, dir, s, map)); } EffectCone.CreateSmokeCone(position, 360, size, 2f, 14, 10, map); map.AddEffect(new EffectRing(position, 7f * size, 1.2f * size, Color.White, map)); }
public override void Hit() { Map.AddEffect(new EffectRing(position, 6f, 1.2f, Color.White, Map)); EffectCone.CreateSmokeCone(position, TKMath.GetAngle(velocity), 1.2f, 1f, 4, 5, Map); Random rng = new Random(); for (int i = 0; i < 2; i++) { float size = 0.5f + (float)rng.NextDouble() * 0.3f; float dir = ((float)rng.NextDouble() - 0.5f) * 45f; Map.AddEffect(new EffectRockSmoke(position, TKMath.GetAngle(velocity) + 180 + dir, size, Map)); } base.Hit(); }