コード例 #1
0
 public void Draw(LineRenderer lr, int x, int y, Pen p)
 {
     foreach (var step in steps)
     {
         if (step is GoTo g)
         {
             lr.GoTo(x + g.X, y + g.Y);
         }
         else if (step is H h)
         {
             lr.HLine(p, h.L);
         }
         else if (step is V v)
         {
             lr.VLine(p, v.L);
         }
     }
 }
コード例 #2
0
ファイル: Sparkle.cs プロジェクト: zdepav/gameee
 public void Draw(LineRenderer r)
 {
     if (Dead)
     {
         return;
     }
     r.GoTo(x, y - size);
     r.VLine(pen, size * 2 + 1);
     r.GoTo(x - size, y);
     r.HLine(pen, size * 2 + 1);
     if (size > 3)
     {
         r.GoTo(x + 3, y - 1);
         r.VLine(pen, 2);
         r.GoTo(x - 3, y - 1);
         r.VLine(pen, 2);
         r.GoTo(x - 1, y + 3);
         r.HLine(pen, 2);
         r.GoTo(x - 1, y - 3);
         r.HLine(pen, 2);
     }
 }