Пример #1
0
        /// <summary>
        /// Add new regions
        /// </summary>
        /// <param name="location"></param>
        public void Add(PointF first, PointF last)
        {
            var location = new Location();

            location.Left   = (int)first.X;
            location.Top    = (int)first.Y;
            location.Right  = (int)last.X;
            location.Bottom = (int)last.Y;
            Respawns.Add(location);

            AddedLocation?.Invoke(this, location);
        }
Пример #2
0
        /// <summary>
        /// Add new regions
        /// </summary>
        /// <param name="first"></param>
        /// <param name="last"></param>
        public void AddRespawn(Vector first, Vector last)
        {
            var location = new Respawn
            {
                Rectangle = new RectangleVector()
                {
                    LeftTop     = first,
                    RightBottom = last
                }
            };

            Respawns.Add(location);

            Added?.Invoke(this, new AddedArgs(location, typeof(Respawn)));
        }