Example #1
0
 public static void PlaceTree(this Console map, Point position)
 {
     // Place trunk
     map.SetCellAppearance(position.X, position.Y, Trunk);
     // Add Shadows
     // TODO: Check if height differs etc...
     for (int i = 0; i < TreeShadowShape.Length; i++)
     {
         int  x   = position.X + TreeShadowShape[i].X;
         int  y   = position.Y + TreeShadowShape[i].Y;
         Cell old = map.GetCellAppearance(x, y);
         map.SetCellAppearance(x, y, new Cell((old.Foreground).FillAlpha(), (old.Background * .8f).FillAlpha(), old.Glyph));
     }
 }