示例#1
0
文件: Human.cs 项目: sword36/town
        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;
            }
        }