コード例 #1
0
ファイル: GameUpdateDraw.cs プロジェクト: BlueBananasaurus/BP
        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
ファイル: GameUpdateDraw.cs プロジェクト: BlueBananasaurus/BP
 public static void InGameUpdate()
 {
     Game1.mapLive.Update();
     Game1.PlayerInstance.Update(MouseInput.MouseRealPosGame());
     Camera2DGame.Update();
     UIPlayer.Update();
     Game1.PlayerInstance.UpdateWeapons(MouseInput.MouseRealPosGame());
 }