Example #1
0
 public virtual void Render(DwarfTime time)
 {
     if (Recharges && !RechargeTimer.HasTriggered)
     {
         Drawer2D.DrawLoadBar(World.Camera, World.CursorLightPos - Vector3.Up, Color.White, Color.Black, 150, 20, RechargeTimer.CurrentTimeSeconds / RechargeTimer.TargetTimeSeconds);
         Drawer2D.DrawTextBox("Charging...", World.CursorLightPos + Vector3.Up * 2);
     }
 }
Example #2
0
 public virtual void Render(DwarfTime time)
 {
     // Todo: Do this with GUI stuff?
     if (Recharges && !RechargeTimer.HasTriggered)
     {
         Drawer2D.DrawLoadBar(World.Camera, World.CursorLightPos - Vector3.Up, Color.Cyan, Color.Black, 64, 4, RechargeTimer.CurrentTimeSeconds / RechargeTimer.TargetTimeSeconds);
         Drawer2D.DrawTextBox("Charging...", World.CursorLightPos + Vector3.Up * 2);
     }
 }
Example #3
0
        public void Render(DwarfTime game, GraphicsDevice graphics)
        {
            foreach (Room room in DesignatedRooms)
            {
                if (room.IsBuilt)
                {
                    Drawer3D.DrawBox(room.GetBoundingBox(), Color.White, 0.1f, true);
                }
            }


            foreach (BuildRoomOrder roomDesignation in BuildDesignations)
            {
                BoundingBox roomBox = roomDesignation.GetBoundingBox();
                roomBox.Max = new Vector3(roomBox.Max.X, roomBox.Max.Y + 0.1f, roomBox.Max.Z);

                Drawer3D.DrawBox(roomBox, Color.White, 0.1f, true);
                List <BuildVoxelOrder> removals = new List <BuildVoxelOrder>();
                foreach (BuildVoxelOrder des in roomDesignation.VoxelOrders)
                {
                    Drawer3D.DrawBox(des.Voxel.GetBoundingBox(), Color.LightBlue, 0.05f, true);
                    BoundingBox centerBox = des.Voxel.GetBoundingBox();
                    centerBox.Min += new Vector3(0.7f, 1.1f, 0.7f);
                    centerBox.Max += new Vector3(-0.7f, 0.2f, -0.7f);
                    Drawer3D.DrawBox(centerBox, Color.LightBlue, 0.01f, true);

                    if (des.Voxel.IsEmpty)
                    {
                        removals.Add(des);
                    }
                }

                foreach (BuildVoxelOrder des in removals)
                {
                    roomDesignation.VoxelOrders.Remove(des);
                }

                Vector3 textLocation = (roomBox.Max - roomBox.Min) / 2.0f + roomBox.Min + new Vector3(0, 2.0f, 0);
                Drawer2D.DrawTextBox(roomDesignation.GetTextDisplay(), textLocation);
            }
        }