Пример #1
0
 public void Draw(SpriteBatch spriteBatch)
 {
     spriteBatch.Draw(Tex, Pos, Color.White);
     if (InvWindow.Shown == false)
     {
         InvBar.Draw(spriteBatch);
     }
     if (InvWindow.Shown == true)
     {
         InvWindow.Draw(spriteBatch);
     }
 }
Пример #2
0
    private void DrawWindow(WindowTypes windowType)
    {
        //colony toolbar
        if (windowType == WindowTypes.resources)
        {
            resourcesWindow.Draw();
        }
        if (windowType == WindowTypes.structures)
        {
            structuresWindow.Draw();
        }

        //personal toolbar
        if (windowType == WindowTypes.inventory)
        {
            inventoryWindow.Draw();
        }
        if (windowType == WindowTypes.blueprints)
        {
            blueprintWindow.Draw();
        }
    }
Пример #3
0
 public void DrawInventory()
 {
     InventoryWindow.Draw();
     InventoryWindow.PrintItems(GameSession.Player);
 }
Пример #4
0
        public override void Draw(SpriteBatch spriteBatch)
        {
            ScreenService.Instance.GraphicsDevice.Viewport = ScreenService.Instance.DefaultScreenCamera.CurrentViewport;
            spriteBatch.Begin(
                SpriteSortMode.FrontToBack, // this is also the order for building the screen.
                null,
                SamplerState.PointClamp,
                null,
                null,
                null,
                ScreenService.Instance.DefaultScreenCamera.TransformMatrix);
            base.Draw(spriteBatch);

            if (!Images.Any())
            {
                Messages.Add("no image received from server");
            }
            foreach (var img in Images.ToList())
            {
                img.Draw(spriteBatch);
            }

            if (!InventoryImages.Any())
            {
                Messages.Add("no inventory image received from server");
            }
            foreach (var img in InventoryImages.ToList())
            {
                img.Draw(spriteBatch);
            }

            MultiplayerText.Draw(spriteBatch);
            HealthImage.Draw(spriteBatch);
            SpeedImage.Draw(spriteBatch);
            StrenghImage.Draw(spriteBatch);
            DialogImage.Draw(spriteBatch);
            CursorImage.Draw(spriteBatch);

            //LerpMouseImage.Draw(spriteBatch);

            if (InfoWindow?.IsVisible == true)
            {
                InfoWindow?.Draw(spriteBatch);
            }

            if (DialogWindow?.IsVisible == true)
            {
                DialogWindow?.Draw(spriteBatch);
            }

            if (InventoryWindow?.IsVisible == true)
            {
                InventoryWindow.Draw(spriteBatch);
            }

            if (CharacterWindow?.IsVisible == true)
            {
                MoneyCount.Draw(spriteBatch);
                CharacterWindow?.Draw(spriteBatch);
            }

            if (CharacterWindow?.IsVisible == true)
            {
                CharacterWindow?.Draw(spriteBatch);
            }

            if (ChatWindow?.IsVisible == true)
            {
                ChatWindow?.Draw(spriteBatch);
            }

            spriteBatch.End();
        }