Beispiel #1
0
        private void paintStroke(CanvasStroke <bool> stroke)
        {
            Dictionary <Loc, uint> brush = new Dictionary <Loc, uint>();

            foreach (Loc loc in stroke.GetLocs())
            {
                if (!Collision.InBounds(ZoneManager.Instance.CurrentGround.TexWidth, ZoneManager.Instance.CurrentGround.TexHeight, loc))
                {
                    continue;
                }

                brush[loc] = stroke.GetBrush(loc) ? 1u : 0u;
            }
            DiagManager.Instance.DevEditor.GroundEditor.Edits.Apply(new DrawBlockUndo(brush));
        }
        private void paintStroke(CanvasStroke <EffectTile> stroke)
        {
            Dictionary <Loc, EffectTile> brush = new Dictionary <Loc, EffectTile>();

            foreach (Loc loc in stroke.GetLocs())
            {
                if (!Collision.InBounds(ZoneManager.Instance.CurrentMap.Width, ZoneManager.Instance.CurrentMap.Height, loc))
                {
                    continue;
                }

                brush[loc] = new EffectTile(stroke.GetBrush(loc), loc);
            }

            DiagManager.Instance.DevEditor.MapEditor.Edits.Apply(new DrawTileUndo(brush));
        }