public static IEffect Compose(this IEffect effect1, IEffect effect2) { return(new DrawEffect((font, batch, pos) => { effect1.Draw(font, batch, pos); effect2.Draw(font, batch, pos); })); }
public void Draw(SpriteBatch batch) { batch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend); cursorRenderEffect?.Draw(font, batch, Vector2.Zero); foreach (var row in cellEffects) { foreach (var cell in row.Value) { cell.Item2.Render(batch, cell.Item1); } } batch.End(); }
public static IEffect Translate(this IEffect effect, float x, float y) { return(new DrawEffect((font, batch, pos) => effect.Draw(font, batch, new Vector2(x, y)))); }