Exemple #1
0
        public void UpdateRect()
        {
            if (_Region != null)
            {
                _Region.Unregister();
                _Region = null;
            }

            if (_Rect.Start != Point2D.Zero && _Rect.End != Point2D.Zero && this.Map != Map.Internal)
            {
                Point3D thisLoc = this.GetWorldLocation();
                Region  parent  = Region.Find(thisLoc, this.Map);

                if (parent == this.Map.DefaultRegion)
                {
                    parent = null;
                }

                _Region = new BattleBuildingRegion(this, parent, _Rect, thisLoc, this.Map);
            }
        }