コード例 #1
0
ファイル: BuildZoneOrder.cs プロジェクト: hhy5277/dwarfcorp
        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
ファイル: BuildRoomOrder.cs プロジェクト: svifylabs/dwarfcorp
        public BoundingBox GetBoundingBox()
        {
            List <BoundingBox> components = VoxelOrders.Select(vox => vox.Voxel.GetBoundingBox()).ToList();

            return(MathFunctions.GetBoundingBox(components));
        }