示例#1
0
文件: Effects.cs 项目: gmich/Gem
 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);
     }));
 }
示例#2
0
        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();
        }
示例#3
0
文件: Effects.cs 项目: gmich/Gem
 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))));
 }