예제 #1
0
        /// <summary>Raised before drawing the HUD (item toolbar, clock, etc) to the screen. The vanilla HUD may be hidden at this point (e.g. because a menu is open).</summary>
        /// <param name="sender">The event sender.</param>
        /// <param name="e">The event arguments.</param>
        public static void OnRenderingHud(object sender, RenderingHudEventArgs e)
        {
            try
            {
                if (Game1.spriteBatch == null)
                {
                    return;
                }

                ChatMenu.drawChat(true);

                if (Multiplayer.mode == Mode.Singleplayer)
                {
                    return;
                }

                if (Multiplayer.mode != Mode.Singleplayer)
                {
                    Multiplayer.draw(Game1.spriteBatch);
                }
            }
            catch (Exception ex)
            {
                Log.error("Exception during predraw: " + ex);
            }
        }
예제 #2
0
        public static void onPreDraw(object sender, EventArgs args)
        {
            try
            {
                if (Game1.spriteBatch == null)
                {
                    return;
                }

                ChatMenu.drawChat(true);

                if (Multiplayer.mode == Mode.Singleplayer)
                {
                    return;
                }

                if (Multiplayer.mode != Mode.Singleplayer)
                {
                    Multiplayer.draw(Game1.spriteBatch);
                }
            }
            catch (Exception e)
            {
                Log.Async("Exception during predraw: " + e);
            }
        }