public void At(string alias, Vector2 position, float normalSize = 1, float normalCount = 1) { VFXContainer vfx = GetEffect(alias); var size = vfx.VFXData.RandomSize * normalSize; var count = vfx.VFXData.RandomCount * normalCount; for (int i = 0; i < count; i++) { vfx.System.Emit(new Vector3(position.x, 0, position.y), Vector3.zero, size, vfx.VFXData.Lifetime, Color.white); } }
public void At(string alias, Vector2 position, Vector2 normal, float normalSize = 1, float normalCount = 1) { VFXContainer vfx = GetEffect(alias); var size = vfx.VFXData.RandomSize * normalSize; var count = vfx.VFXData.RandomCount * normalCount; var c1 = vfx.VFXData.Color.Evaluate(0); var c2 = vfx.VFXData.Color.Evaluate(1); for (int i = 0; i < count; i++) { Color c = new Color(Random.Range(c1.r, c2.r), Random.Range(c1.g, c2.g), Random.Range(c1.b, c2.b), 1); vfx.System.Emit(new Vector3(position.x, position.y, 0), vfx.VFXData.GetRandomVelocity(normal), size, vfx.VFXData.Lifetime, c); } }