Exemplo n.º 1
0
 private static void WaterAnimate()
 {
     RenderTargetsSettings.SetAndClear(Game1.WaterAnimateLeft, Color.Black);
     DrawAnimateWater.DrawLeft();
     RenderTargetsSettings.SetAndClear(Game1.WaterAnimateRight, Color.Black);
     DrawAnimateWater.DrawRight();
 }
Exemplo n.º 2
0
 private static void WaterAnimateTop()
 {
     RenderTargetsSettings.SetAndClear(Game1.WaterAnimateLeftTop, Color.Transparent);
     DrawAnimateWaterOver.DrawLeft();
     RenderTargetsSettings.SetAndClear(Game1.WaterAnimateRightTop, Color.Transparent);
     DrawAnimateWaterOver.DrawRight();
 }
Exemplo n.º 3
0
 private static void ProcessGaussVertical()
 {
     RenderTargetsSettings.SetAndClear(null, Color.Black);
     Game1.SpriteBatchGlobal.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, state);
     Game1.SpriteBatchGlobal.Draw((Game1.FinalScreen), new Rectangle(Globals.WinOffset.X, Globals.WinOffset.Y, Globals.Winsize.X, Globals.Winsize.Y), new Rectangle(0, 0, (int)Globals.WinRenderSize.X, (int)Globals.WinRenderSize.Y), Color.White);
     Effects.GaussVerticalEffect(Game1.ToProcessSecondPass, Game1.Textures["WeaponMenuBackMask"]);
     Game1.SpriteBatchGlobal.Draw((Game1.CanvasToSecondPass), new Rectangle(Globals.WinOffset.X, Globals.WinOffset.Y, Globals.Winsize.X, Globals.Winsize.Y), new Rectangle(0, 0, (int)Globals.WinRenderSize.X, (int)Globals.WinRenderSize.Y), Color.White);
     Effects.ResetEffect3D();
     Game1.SpriteBatchGlobal.End();
 }
Exemplo n.º 4
0
 private static void ProcessGaussHorizontal()
 {
     RenderTargetsSettings.SetAndClear(Game1.ToRenderFirstPass, Color.Black);
     Game1.GraphicsGlobal.GraphicsDevice.SetRenderTargets(Game1.ToProcessSecondPass);
     Game1.SpriteBatchGlobal.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap);
     Effects.GaussHorizontalEffect(Game1.ToPrepareGaussPass1, Game1.Textures["WeaponMenuBackMask"]);
     Game1.SpriteBatchGlobal.Draw((Game1.ToRenderFirstPass), Vector2.Zero);
     Effects.ResetEffect3D();
     Game1.SpriteBatchGlobal.End();
 }
Exemplo n.º 5
0
 private static void DrawLights(IMap map)
 {
     RenderTargetsSettings.SetAndClear(Game1.Lights, new Color(map.LightLevel));
     Game1.SpriteBatchGlobal.Begin(SpriteSortMode.Immediate, BlendState.Additive, SamplerState.PointClamp, transformMatrix: Camera2DGame.GetViewMatrix());
     map.DrawLights();
     Game1.SpriteBatchGlobal.End();
     Game1.SpriteBatchGlobal.Begin(SpriteSortMode.Immediate, BlendState.Additive, SamplerState.PointClamp);
     Game1.SpriteBatchGlobal.Draw(Game1.LightNormalHolder, Vector2.Zero);
     Game1.SpriteBatchGlobal.End();
 }
Exemplo n.º 6
0
 public static void DrawEditorWin()
 {
     RenderTargetsSettings.SetAndClear(Game1.Win, Color.Transparent);
     Game1.SpriteBatchGlobal.Begin(samplerState: SamplerState.PointWrap, blendState: BlendState.AlphaBlend, sortMode: SpriteSortMode.Immediate);
     Game1.SpriteBatchGlobal.Draw(Game1.Textures["BackgroundEditorMenu"], Vector2.Zero, Color.White);
     Editor.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();
 }
Exemplo n.º 7
0
 private static void DrawPartMenu()
 {
     RenderTargetsSettings.SetAndClear(Game1.MenuParts, Color.Transparent);
     Game1.SpriteBatchGlobal.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap);
     if (Game1.GameScreen == InGameScreen.assembly)
     {
         UIAssembly.Instance.Draw();
     }
     else if (Game1.GameScreen == InGameScreen.shop)
     {
         UIShop.Instance.Draw();
     }
     Game1.SpriteBatchGlobal.End();
 }
Exemplo n.º 8
0
        private static void DrawLightsNormalsWorld()
        {
            RenderTargetsSettings.SetAndClear(Game1.LightNormalHolder, Color.Black);
            Game1.SpriteBatchGlobal.Begin(SpriteSortMode.Immediate, BlendState.Additive, SamplerState.PointClamp);

            foreach (DecorationStatic decor in Game1.mapLiveWorld.mapDecorations)
            {
                if (decor.LightObj?.Position != null && decor.LightObj?.LightColor != null)
                {
                    Game1.EffectNormalLight.Parameters["size"].SetValue(Globals.WinRenderSize);
                    Game1.EffectNormalLight.Parameters["lightColor"].SetValue(decor.LightObj.LightColor);
                    Game1.EffectNormalLight.Parameters["positionTex"].SetValue(Camera2DGame.Position);
                    Game1.EffectNormalLight.Parameters["light"].SetValue(decor.LightObj.Position);
                    Game1.EffectNormalLight.Parameters["normal"].SetValue(Game1.NormalMapBuffer);
                    Game1.EffectNormalLight.CurrentTechnique.Passes[0].Apply();
                    Game1.SpriteBatchGlobal.Draw(Game1.Textures["testaaa"], Vector2.Zero, Color.White);
                }
            }

            Game1.SpriteBatchGlobal.End();
        }
Exemplo n.º 9
0
 private static void DrawNormals(IMap map)
 {
     RenderTargetsSettings.SetAndClear(Game1.NormalMapBuffer, Color.Transparent);
     map.DrawNormal();
 }
Exemplo n.º 10
0
 private static void DrawLayer1(IMap map)
 {
     RenderTargetsSettings.SetAndClear(Game1.Layer1, Color.Transparent);
     map.Draw();
 }
Exemplo n.º 11
0
 private static void DrawWaterMaskWorld(IMap map)
 {
     RenderTargetsSettings.SetAndClear(Game1.WaterMask, Color.Black);
     map.DrawWaterMask();
 }