/// <summary> LocationDisambiguator implementation </summary>
 public override bool isSelectable(Location loc)
 {
     if (isPlacing)
     {
         // structures can be placed only on the ground
         return(GroundDisambiguator.theInstance.isSelectable(loc));
     }
     else
     {
         return(Commercial.get(loc) != null);
     }
 }
        /// <summary>
        /// Removes the structure from given location, if any.
        /// </summary>
        public override void remove(MapViewWindow view, Location loc)
        {
            Commercial c = Commercial.get(loc);

            if (c != null)
            {
                if (c.isOwned)
                {
                    c.remove();
                }
                else
                {
                    MainWindow.showError("Can not remove");
                }
                //! MainWindow.showError("撤去できません");
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Removes the structure from given location, if any.
        /// </summary>
        public override void Remove(MapViewWindow view, Location loc)
        {
            Commercial c = Commercial.get(loc);

            if (c != null)
            {
                if (c.isOwned)
                {
                    c.remove();
                }
                else
                {
                    MessageBox.Show("Can not remove");
                }
                //! MessageBox.Show("撤去できません");
            }
        }