Пример #1
0
        private void UpdateBuilding()
        {
            IBuilding b = town.IsHumanInBuilding(this);

            if ((CurrentBuilding == null) && (b != null))
            {
                b.AddHuman(this);
                CurrentBuilding = b;
                return;
            }

            if ((CurrentBuilding != null) && (b == null))
            {
                CurrentBuilding.RemoveHuman(this);
                CurrentBuilding = null;
                return;
            }
        }