public void Draw(GameTime gameTime) { UpdateFrameCounter(); // Everything between penumbra.BeginDraw and penumbra.Draw will be // lit by the lighting system. Penumbra.BeginDraw(); graphics.Clear(BackgroundColor); DrawBeginCamera2D(); //Draw sprites here, so they will affected by the camera movement spriteBatch.Draw(CenterTexture, new Vector2(ViewportWidth / 2, ViewportHeight / 2), Color.White); spriteBatch.Draw(MoveCamTexture, new Vector2(-150 + ViewportWidth / 2, ViewportHeight / 2), null, Color.White, 0f, new Vector2(MoveCamTexture.Width / 2, MoveCamTexture.Height / 2), 1f, SpriteEffects.None, 0f); DrawEndCamera2D(); DrawPhysicsDebugView(); Penumbra.Draw(); DrawDisplay(); }
public void Draw(GameTime gameTime) { UpdateFrameCounter(); // Everything between penumbra.BeginDraw and penumbra.Draw will be // lit by the lighting system. Penumbra.BeginDraw(); graphics.Clear(BackgroundColor); if (tBody != null) { spriteBatch.Begin(); // Draw the texture of the MGLogo spriteBatch.Draw(MGLogo, new Vector2(-7 + ViewportWidth - MGLogo.Width / 2, 7 + MGLogo.Height / 2), null, Color.White, 0, new Vector2(MGLogo.Width / 2, MGLogo.Height / 2), 1f, SpriteEffects.None, 0); // Draw the texture of the physics body spriteBatch.Draw(tBodyTexture, ConvertUnits.ToDisplayUnits(tBody.Position), null, Color.White, tBody.Rotation, tBodyOrigin, tBodyScale, SpriteEffects.None, 0); spriteBatch.End(); } Penumbra.Draw(); DrawPhysicsDebugView(); DrawDisplay(); }
public PenumbraApi(Penumbra penumbra) { _penumbra = penumbra; _lumina = (Lumina.GameData? )Dalamud.GameData.GetType() .GetField("gameData", BindingFlags.Instance | BindingFlags.NonPublic) ?.GetValue(Dalamud.GameData); }
public static void DrawSupportButton() { if (ImGui.Button(SupportInfoButtonText)) { var text = Penumbra.GatherSupportInformation(); ImGui.SetClipboardText(text); } }
public PenumbraApi(Penumbra penumbra) { _penumbra = penumbra; _lumina = (Lumina.GameData? )Dalamud.GameData.GetType() .GetField("gameData", BindingFlags.Instance | BindingFlags.NonPublic) ?.GetValue(Dalamud.GameData); _penumbra.ObjectReloader.GameObjectRedrawn += OnGameObjectRedrawn; }
public static void Prepare(Light2D light) { FillWhite.Calculate(); FillBlack.Calculate(); Penumbra.Calculate(); lightDrawAbove = light.whenInsideCollider == Light2D.WhenInsideCollider.DrawAbove; }
public void Draw(GameTime gameTime) { Penumbra.BeginDraw(); Penumbra.Transform = Camera.Transform; Game.GraphicsDevice.Clear(Color.Black); SpriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.AlphaBlend, SamplerState.PointWrap, null, null, null, Camera.Transform); DrawToWorld(); SpriteBatch.End(); Penumbra.Draw(gameTime); SpriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.AlphaBlend, null, null, null, null, Camera.Transform); DrawToWorldWithoutShader(); SpriteBatch.End(); SpriteBatch.Begin(SpriteSortMode.FrontToBack, null, SamplerState.PointWrap, null, null, null, null); DrawUserInterface(); SpriteBatch.End(); SpriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.Additive, null, null, null, null, Camera.Transform); DrawToWorldAdditiveBlend(); SpriteBatch.End(); }
public RedrawController(Penumbra penumbra) => _penumbra = penumbra;
public ModsController(Penumbra penumbra) => _penumbra = penumbra;
public ResourceLoader(Penumbra _) { SignatureHelper.Initialise(this); }