示例#1
0
        public virtual void Build(bool silent = false)
        {
            if (IsBuilt)
            {
                return;
            }
            IsBuilt = true;

            ToBuild.CompleteRoomImmediately(VoxelOrders.Select(o => o.Voxel).ToList());

            if (!silent)
            {
                World.MakeAnnouncement(String.Format("{0} was built", ToBuild.Type.Name), null);
                SoundManager.PlaySound(ContentPaths.Audio.Oscar.sfx_gui_positive_generic, 0.15f);
            }

            foreach (GameComponent fence in WorkObjects)
            {
                fence.Die();
            }
        }
示例#2
0
        public BoundingBox GetBoundingBox()
        {
            List <BoundingBox> components = VoxelOrders.Select(vox => vox.Voxel.GetBoundingBox()).ToList();

            return(MathFunctions.GetBoundingBox(components));
        }