Пример #1
0
        private static void DrawFinal(IMap map)
        {
            Game1.GraphicsGlobal.GraphicsDevice.SetRenderTargets(Game1.FinalScreen);
            Game1.SpriteBatchGlobal.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap);
            Game1.SpriteBatchGlobal.Draw(Game1.WaterWithoutLights, Vector2.Zero);
            Game1.SpriteBatchGlobal.End();
            if (map is Map)
            {
                Game1.SpriteBatchGlobal.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, transformMatrix: Camera2DGame.GetViewMatrix());

                foreach (Inpc ui in (map as Map).MapNpcs)
                {
                    if (ui as IUI != null)
                    {
                        (ui as IUI).DrawUI();
                    }
                }

                Game1.SpriteBatchGlobal.End();
            }
            Game1.SpriteBatchGlobal.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap);
            if (Game1.State == GlobalState.inGame)
            {
                UIPlayer.Draw();
            }
            foreach (UIInformer info in Game1.InfoList.Reverse <UIInformer>())
            {
                info.Position = new Vector2(8, Game1.InfoList.IndexOf(info) * 32 + 8);
                info.Draw();
            }
            Game1.SpriteBatchGlobal.End();
        }
Пример #2
0
 public static void InGameUpdate()
 {
     Game1.mapLive.Update();
     Game1.PlayerInstance.Update(MouseInput.MouseRealPosGame());
     Camera2DGame.Update();
     UIPlayer.Update();
     Game1.PlayerInstance.UpdateWeapons(MouseInput.MouseRealPosGame());
 }