Beispiel #1
0
        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);

            SpriteBatch.Begin(Camera);

            RenderBackground.DrawBackground();
            GrassTufts.DrawGrassTufts();
            Bushes.DrawBushes();

            DrawHumanPawns.DrawHumans();
            DrawZedPawns.DrawZeds();

            DrawStructures.DrawBuildings();
            RuinedBuilding.DrawRuinedBuildings();

            Trees.DrawTrees();
            Trees.DrawTreeFoliage();
            Resource.DrawGatherIcon();

            HealthBar.DrawHealthBar();


            //Build Menus
            if (BuildMenuPane.IsBuildMenuWindowVisible)
            {
                DrawBuildMenus.DrawBuildMenuPane();
                DrawBuildMenus.DrawMainMenuIcons();
            }

            if (BuildMenuPane.IsBuildMenuWindowVisible && BuildMenuInteraction.IsBuildMenuOpen)
            {
                DrawBuildMenus.DrawBuildMenuIcons();
            }

            if (BuildMenuRollOverText.IsBuildMenuRollOverTextVisible)
            {
                BuildMenuRollOverText.DrawRolloverText(BuildMenuRollOverText.RollOverTxt);
            }


            //Building Placement
            if (BuildingPlacementHandler.IsPlacingBuilding)
            {
                if (BuildingPlacementHandler.CheckIfGroundClear(Blueprint))
                {
                    SpriteBatch.Draw(BuildingPlacementHandler.SetBuildingTexture(), MouseCoordinates, Color.Green);
                }
                else
                {
                    SpriteBatch.Draw(BuildingPlacementHandler.SetBuildingTexture(), MouseCoordinates, Color.Red);
                }
            }


            //Pawn PawnInfoSB
            if (PawnInfo.IsPawnInfoVisible)
            {
                //PawnInfoMenuClose.ClosePawnInfoMenu();
                DrawPawnsInfoPanel.DrawPawnInfoPanel();
                SelectedPawn.DrawSelectedPawnIndicator();
            }
            if (ExtendIconChecks.IsWeaponIconListVisible)
            {
                DrawPawnInfoIcons.DrawWeaponListIcons();
            }


            //Pawn rollover text
            DrawDetailPane.DrawDetailsPane();
            if (DetailsPane.isDetailPaneVisible)
            {
                DrawDetailPane.DrawDetailsPaneText();
            }

            if (!Bulldozer.IsBulldozerActive)
            {
                Cursor.DrawCursor();
            }
            else
            {
                Cursor.DrawDozerCursor();
            }


            if (Zeds.Debug.Debug.IsDebugEnabled)
            {
                Zeds.Debug.Debug.DrawDebugInfo();
                fps.DrawFps();
            }

            SpriteBatch.End();

            base.Draw(gameTime);
        }