public override void Draw(GameTime gameTime) { Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, Camera.GetTransformation()); Camera.Draw(Game.GenericTexture, new Rectangle((int)Camera.TopLeftCorner.X - 10, (int)Camera.TopLeftCorner.Y - 10, 1420, 820), Color.Black * BackBufferOpacity); foreach (var current in m_enemyList) { current.Draw(Camera); } m_playerFrame.Draw(Camera); m_player.Draw(Camera); if (m_playerGhost.Opacity > 0f) { m_playerGhost.X += (float)Math.Sin(Game.TotalGameTime * 5f) * 60f * (float)gameTime.ElapsedGameTime.TotalSeconds; } m_playerGhost.Draw(Camera); Camera.End(); Camera.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, null, null, null); m_spotlight.Draw(Camera); m_dialoguePlate.Draw(Camera); m_continueText.Draw(Camera); Camera.End(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { Camera.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null); m_mapDisplay.DrawRenderTargets(Camera); Camera.End(); Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null); Camera.GraphicsDevice.SetRenderTarget(Game.ScreenManager.RenderTarget); Camera.GraphicsDevice.Clear(Color.Black); Camera.Draw((ScreenManager as RCScreenManager).GetLevelScreen().RenderTarget, Vector2.Zero, Color.White * 0.3f); m_mapDisplay.Draw(Camera); if (IsTeleporter && m_teleporterList.Length > 0) { m_titleText.Draw(Camera); var spriteObj = m_teleporterList[m_selectedTeleporter]; m_playerIcon.Position = new Vector2(spriteObj.X + 14f, spriteObj.Y - 20f); m_playerIcon.Draw(Camera); } if (!IsTeleporter) { m_recentreText.Draw(Camera); m_navigationText.Draw(Camera); } if (!IsTeleporter && (Game.PlayerStats.Traits.X == 11f || Game.PlayerStats.Traits.Y == 11f)) { m_alzheimersQuestionMarks.Draw(Camera); } m_continueText.Draw(Camera); m_legend.Draw(Camera); Camera.End(); base.Draw(gameTime); }
public override void Draw(Camera2D camera) { if (Visible) { if (!ShowBarsOnly) { base.Draw(camera); m_coin.Draw(camera); m_playerLevelText.Draw(camera); m_goldText.Draw(camera); camera.GraphicsDevice.SamplerStates[0] = SamplerState.PointClamp; var abilitiesSpriteArray = m_abilitiesSpriteArray; for (var i = 0; i < abilitiesSpriteArray.Length; i++) { var spriteObj = abilitiesSpriteArray[i]; spriteObj.Draw(camera); } m_iconHolder1.Draw(camera); m_iconHolder2.Draw(camera); m_spellIcon.Draw(camera); m_specialItemIcon.Draw(camera); camera.GraphicsDevice.SamplerStates[0] = SamplerState.LinearClamp; m_spellCost.Draw(camera); } m_mpBar.Draw(camera); m_mpText.Draw(camera); if (Game.PlayerStats.Traits.X != 30f && Game.PlayerStats.Traits.Y != 30f) { m_hpBar.Draw(camera); m_hpText.Draw(camera); } m_mpBarContainer.Draw(camera); m_hpBarContainer.Draw(camera); } }
private void PlayerDrawHandler(PlayerDrawEventArgs args) { if (args.IsPreDraw && _shadowSprite != null && _shadowSprite.Visible) { _shadowSprite.Draw(args.Camera); } }
public override void Draw(GameTime gameTime) { Camera.Begin(); Camera.Draw(Game.GenericTexture, new Rectangle(0, 0, 1320, 720), Color.Black * BackBufferOpacity); m_blacksmithUI.Draw(Camera); m_selectionIcon.Draw(Camera); m_textInfoTitleContainer.Draw(Camera); m_textInfoStatContainer.Draw(Camera); m_textInfoStatModContainer.Draw(Camera); m_addPropertiesTitleText.Draw(Camera); m_addPropertiesText.Draw(Camera); m_unlockCostContainer.Draw(Camera); m_equipmentTitleText.Draw(Camera); foreach (var current in m_masterIconArray) { for (var i = 0; i < current.Length; i++) { current[i].Draw(Camera); } } m_navigationText.Draw(Camera); m_cancelText.Draw(Camera); m_confirmText.Draw(Camera); m_equippedIcon.Draw(Camera); foreach (var current2 in m_newIconList) { current2.Draw(Camera); } Camera.End(); base.Draw(gameTime); }
public override void Draw(Camera2D camera) { if (Visible) { m_namePlate.Draw(camera); m_name.Draw(camera); } base.Draw(camera); }
public override void Draw(Camera2D camera) { base.Draw(camera); m_setKeyPlate.Draw(camera); if (m_selectedEntry != null) { m_selectionBar.Position = new Vector2(m_selectedEntry.AbsX - 15f, m_selectedEntry.AbsY); m_selectionBar.Draw(camera); } }
public override void Draw(GameTime gameTime) { Camera.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearWrap, null, null); Camera.Draw(Game.GenericTexture, new Rectangle(0, 0, 1320, 720), Color.Black * BackBufferOpacity); m_dialogContainer.Draw(Camera); if (m_dialogContainer.ScaleX > 0f) { m_dialogContainer.GetChildAt(3).Y = m_dialogContinueIconY + (float)Math.Sin(Game.TotalGameTime * 20f) * 2f; } m_dialogChoiceContainer.Draw(Camera); Camera.End(); base.Draw(gameTime); }
public override void Draw(GameTime gametime) { Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null); Camera.Draw(Game.GenericTexture, new Rectangle(0, 0, 1320, 720), Color.Black * BackBufferOpacity); Camera.GraphicsDevice.SamplerStates[0] = SamplerState.LinearClamp; m_plate.Draw(Camera); m_titlePlate.Draw(Camera); m_title.Draw(Camera); m_picturePlate.Draw(Camera); Camera.GraphicsDevice.SamplerStates[0] = SamplerState.PointClamp; m_picture.Draw(Camera); Camera.End(); base.Draw(gametime); }
public override void Draw(GameTime gametime) { Camera.Begin(); Camera.Draw(Game.GenericTexture, new Rectangle(0, 0, 1320, 720), Color.Black * BackBufferOpacity); m_title.Draw(Camera); m_slot1Container.Draw(Camera); m_slot2Container.Draw(Camera); m_slot3Container.Draw(Camera); m_confirmText.Draw(Camera); m_cancelText.Draw(Camera); m_navigationText.Draw(Camera); m_deleteProfileText.Draw(Camera); Camera.End(); base.Draw(gametime); }
public override void Draw(Camera2D camera) { m_mountain1.X = camera.TopLeftCorner.X * 0.5f; m_mountain2.X = m_mountain1.X + 2640f; base.Draw(camera); if (m_isRaining) { camera.Draw(Game.GenericTexture, new Rectangle(0, 0, 2640, 720), Color.Black * 0.3f); } if (m_screenShakeCounter > 0f) { camera.X += CDGMath.RandomPlusMinus(); camera.Y += CDGMath.RandomPlusMinus(); m_screenShakeCounter -= (float)camera.GameTime.ElapsedGameTime.TotalSeconds; } if (SmithyAvailable) { m_blacksmithBoard.Draw(camera); m_blacksmith.Draw(camera); m_blacksmithIcon.Draw(camera); } if (EnchantressAvailable) { m_tent.Draw(camera); m_enchantress.Draw(camera); m_enchantressIcon.Draw(camera); } if (ArchitectAvailable) { m_screw.Draw(camera); m_architect.Draw(camera); m_architectIcon.Draw(camera); } if (TollCollectorAvailable) { m_tollCollector.Draw(camera); m_tollCollectorIcon.Draw(camera); } m_blacksmithNewIcon.Draw(camera); m_enchantressNewIcon.Draw(camera); if (m_isRaining) { foreach (var current in m_rainFG) { current.Draw(camera); } } }
public override void Draw(GameTime gametime) { Camera.Begin(); Camera.Draw(Game.GenericTexture, new Rectangle(0, 0, 1320, 720), Color.Black * BackBufferOpacity); m_bgSprite.Draw(Camera); foreach (var current in m_optionsArray) { current.Draw(Camera); } m_quickDropText.Draw(Camera); m_confirmText.Draw(Camera); m_cancelText.Draw(Camera); m_navigationText.Draw(Camera); m_optionsBar.Draw(Camera); Camera.End(); base.Draw(gametime); }
public override void Draw(GameTime gameTime) { m_cloud1.Y = (m_cloud2.Y = (m_cloud3.Y = (m_cloud4.Y = (m_cloud5.Y = Camera.TopLeftCorner.Y * 0.2f)))); m_bg.Y = Camera.TopLeftCorner.Y * 0.2f; Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, null, null, null, Camera.GetTransformation()); m_bg.Draw(Camera); m_cloud1.Draw(Camera); m_cloud2.Draw(Camera); m_cloud3.Draw(Camera); m_cloud4.Draw(Camera); m_cloud5.Draw(Camera); Camera.GraphicsDevice.SamplerStates[0] = SamplerState.PointClamp; m_manor.Draw(Camera); m_impactEffectPool.Draw(Camera); Camera.GraphicsDevice.SamplerStates[0] = SamplerState.LinearClamp; m_selectionIcon.Draw(Camera); var skillArray = SkillSystem.GetSkillArray(); for (var i = 0; i < skillArray.Length; i++) { var skillObj = skillArray[i]; if (skillObj.TraitType != SkillType.Filler && skillObj.TraitType != SkillType.Null && skillObj.Visible) { skillObj.Draw(Camera); } } Camera.End(); Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, null, null); m_dialoguePlate.Draw(Camera); m_continueText.Draw(Camera); m_toggleIconsText.Draw(Camera); m_confirmText.Draw(Camera); m_navigationText.Draw(Camera); m_playerMoney.Draw(Camera); Camera.GraphicsDevice.SamplerStates[0] = SamplerState.PointClamp; m_descriptionDivider.Draw(Camera); m_coinIcon.Draw(Camera); Camera.End(); base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { if (Camera.X > m_background.X + 6600f) { m_background.X = Camera.X; } if (Camera.X < m_background.X) { m_background.X = Camera.X - 1320f; } Camera.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearWrap, null, null, null, Camera.GetTransformation()); m_background.Draw(Camera); Camera.End(); Camera.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, Camera.GetTransformation()); foreach (var current in m_masterArray) { current.Draw(Camera); } foreach (var current2 in m_currentBranchArray) { current2.Draw(Camera); } Camera.End(); if (Camera.Zoom >= 1f) { Camera.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, null, null, null); m_bgShadow.Draw(Camera); m_titleText.Draw(Camera); m_confirmText.Draw(Camera); m_navigationText.Draw(Camera); m_rerollText.Draw(Camera); m_descriptionPlate.Draw(Camera); Camera.End(); } base.Draw(gameTime); }
public override void Draw(GameTime gameTime) { Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null); if (m_screenTypeToLoad != 27) { if (!m_wipeTransition) { m_gateSprite.Draw(Camera); m_effectPool.Draw(Camera); m_loadingText.Position = new Vector2(m_gateSprite.X + 995f, m_gateSprite.Y + 540f); m_loadingText.Draw(Camera); } else { m_blackTransitionIn.Draw(Camera); m_blackTransitionOut.Draw(Camera); m_blackScreen.Draw(Camera); } } Camera.Draw(Game.GenericTexture, new Rectangle(0, 0, 1320, 720), Color.White * BackBufferOpacity); Camera.End(); base.Draw(gameTime); }
public void DrawStep10(Camera2D camera, RenderStep step, GameTime gameTime) { m_projectileIconPool.Draw(camera); m_playerHUD.Draw(camera); if (m_lastEnemyHit != null && m_enemyHUDCounter > 0f) { m_enemyHUD.Draw(camera); } if (m_enemyHUDCounter > 0f) { ProceduralLevelScreen mEnemyHUDCounter = this; mEnemyHUDCounter.m_enemyHUDCounter = mEnemyHUDCounter.m_enemyHUDCounter - (float)gameTime.ElapsedGameTime.TotalSeconds; } if (CurrentRoom.Name != "Start" && CurrentRoom.Name != "Boss" && CurrentRoom.Name != "ChallengeBoss" && m_miniMapDisplay.Visible) { m_mapBG.Draw(camera); m_miniMapDisplay.Draw(camera); } if (CurrentRoom.Name != "Boss" && CurrentRoom.Name != "Ending") { m_compassBG.Draw(camera); m_compass.Draw(camera); } m_objectivePlate.Draw(camera); m_roomEnteringTitle.Draw(camera); m_roomTitle.Draw(camera); if (CurrentRoom.Name != "Ending" && (!Game.PlayerStats.TutorialComplete || Game.PlayerStats.Traits.X == 29f || Game.PlayerStats.Traits.Y == 29f) && Game.PlayerStats.SpecialItem != 8) { m_filmGrain.Draw(camera); } }
public override void Draw(GameTime gametime) { m_playerHUD.SetPosition(new Vector2(m_frontCard.X + 46f, m_frontCard.Y + 64f)); Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, null, null); Camera.Draw(Game.GenericTexture, new Rectangle(0, 0, 1320, 720), Color.Black * BackBufferOpacity); m_frontCard.Draw(Camera); m_backCard.Draw(Camera); m_cancelText.Draw(Camera); Camera.GraphicsDevice.SamplerStates[0] = SamplerState.PointClamp; if (!Game.PlayerStats.IsDead) { if (!m_playerInAir) { ObjContainer mPlayerSprite = m_playerSprite; Rectangle bounds = m_playerSprite.Bounds; mPlayerSprite.Position = new Vector2(m_frontCard.X + 160f, m_frontCard.Y + 280f - ((float)bounds.Bottom - m_playerSprite.Y)); } else { m_playerSprite.Position = new Vector2(m_frontCard.X + 180f, m_frontCard.Y + 202f); } m_playerSprite.Draw(Camera); EffectParameter item = Game.ColourSwapShader.Parameters["desiredTint"]; Color textureColor = m_playerSprite.GetChildAt(12).TextureColor; item.SetValue(textureColor.ToVector4()); var args = RogueAPI.Game.Player.PipeSkinShaderArgs(this, m_playerSprite); Game.ColourSwapShader.Parameters["Opacity"].SetValue(args.Target.Opacity); Game.ColourSwapShader.Parameters["ColourSwappedOut1"].SetValue(args.Target.ColorSwappedOut1.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedIn1"].SetValue(args.Target.ColorSwappedIn1.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedOut2"].SetValue(args.Target.ColorSwappedOut2.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedIn2"].SetValue(args.Target.ColorSwappedIn2.ToVector4()); //if (Game.PlayerStats.Class == 7 || Game.PlayerStats.Class == 15) //{ // Game.ColourSwapShader.Parameters["Opacity"].SetValue(this.m_playerSprite.Opacity); // Game.ColourSwapShader.Parameters["ColourSwappedOut1"].SetValue(this.m_skinColour1.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedIn1"].SetValue(this.m_lichColour1.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedOut2"].SetValue(this.m_skinColour2.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedIn2"].SetValue(this.m_lichColour2.ToVector4()); //} //else if (Game.PlayerStats.Class == 3 || Game.PlayerStats.Class == 11) //{ // Game.ColourSwapShader.Parameters["Opacity"].SetValue(this.m_playerSprite.Opacity); // Game.ColourSwapShader.Parameters["ColourSwappedOut1"].SetValue(this.m_skinColour1.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedIn1"].SetValue(Color.Black.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedOut2"].SetValue(this.m_skinColour2.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedIn2"].SetValue(Color.Black.ToVector4()); //} //else //{ // Game.ColourSwapShader.Parameters["Opacity"].SetValue(1); // Game.ColourSwapShader.Parameters["ColourSwappedOut1"].SetValue(this.m_skinColour1.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedIn1"].SetValue(this.m_skinColour1.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedOut2"].SetValue(this.m_skinColour2.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedIn2"].SetValue(this.m_skinColour2.ToVector4()); //} Camera.End(); Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, Game.ColourSwapShader); m_playerSprite.GetChildAt(12).Draw(Camera); Camera.End(); Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null); if (Game.PlayerStats.IsFemale) { m_playerSprite.GetChildAt(13).Draw(Camera); } m_playerSprite.GetChildAt(15).Draw(Camera); } else { m_tombStoneSprite.Position = new Vector2(m_frontCard.X + 240f, m_frontCard.Y + 280f); m_tombStoneSprite.Draw(Camera); } m_spellIcon.Position = new Vector2(m_frontCard.X + 380f, m_frontCard.Y + 320f); m_spellIcon.Draw(Camera); Camera.End(); base.Draw(gametime); }
public override void Draw(Camera2D camera) { if (FlipPortrait) { m_playerSprite.Rotation = 180f; } if (!m_frameDropping) { m_frameSprite.Position = Position; m_frameSprite.Y -= 12f; m_frameSprite.X += 5f; } m_frameSprite.Opacity = Opacity; m_frameSprite.Draw(camera); if (!IsDead && Spell != 0) { m_spellIconHolder.Position = new Vector2(m_frameSprite.X, m_frameSprite.Bounds.Bottom - 20); m_spellIcon.Position = m_spellIconHolder.Position; m_spellIconHolder.Draw(camera); m_spellIcon.Draw(camera); } m_playerSprite.OutlineColour = OutlineColour; m_playerSprite.OutlineWidth = OutlineWidth; if (!m_frameDropping) { m_playerSprite.Position = Position; m_playerSprite.X += 10f; if (FlipPortrait) { m_playerSprite.X -= 10f; m_playerSprite.Y -= 30f; } } m_playerSprite.Opacity = Opacity; m_playerSprite.Draw(camera); if (CollisionMath.Intersects(Bounds, camera.Bounds)) { if (Class == 7 || Class == 15) { Game.ColourSwapShader.Parameters["desiredTint"].SetValue(Color.White.ToVector4()); Game.ColourSwapShader.Parameters["Opacity"].SetValue(m_playerSprite.Opacity); Game.ColourSwapShader.Parameters["ColourSwappedOut1"].SetValue(m_skinColour1.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedIn1"].SetValue(m_lichColour1.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedOut2"].SetValue(m_skinColour2.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedIn2"].SetValue(m_lichColour2.ToVector4()); camera.End(); camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, Game.ColourSwapShader, camera.GetTransformation()); m_playerSprite.GetChildAt(12).Draw(camera); camera.End(); camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, camera.GetTransformation()); if (IsFemale) { m_playerSprite.GetChildAt(13).Draw(camera); } m_playerSprite.GetChildAt(15).Draw(camera); } else if (Class == 3 || Class == 11) { Game.ColourSwapShader.Parameters["desiredTint"].SetValue(Color.White.ToVector4()); Game.ColourSwapShader.Parameters["Opacity"].SetValue(m_playerSprite.Opacity); Game.ColourSwapShader.Parameters["ColourSwappedOut1"].SetValue(m_skinColour1.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedIn1"].SetValue(Color.Black.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedOut2"].SetValue(m_skinColour2.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedIn2"].SetValue(Color.Black.ToVector4()); camera.End(); camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, Game.ColourSwapShader, camera.GetTransformation()); m_playerSprite.GetChildAt(12).Draw(camera); camera.End(); camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, camera.GetTransformation()); if (IsFemale) { m_playerSprite.GetChildAt(13).Draw(camera); } m_playerSprite.GetChildAt(15).Draw(camera); } } if (!DisablePlaque) { if (!m_frameDropping) { m_plaqueSprite.Position = Position; m_plaqueSprite.X += 5f; m_plaqueSprite.Y = m_frameSprite.Y + m_frameSprite.Height - 30f; } m_plaqueSprite.Draw(camera); camera.GraphicsDevice.SamplerStates[0] = SamplerState.LinearClamp; base.Draw(camera); camera.GraphicsDevice.SamplerStates[0] = SamplerState.PointClamp; } if (m_frameDropping) { m_frameSprite.Draw(camera); m_playerSprite.Draw(camera); } }
public override void Draw(GameTime gametime) { m_playerHUD.SetPosition(new Vector2(m_frontCard.X + 46f, m_frontCard.Y + 64f)); Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, null, null); Camera.Draw(Game.GenericTexture, new Rectangle(0, 0, 1320, 720), Color.Black * BackBufferOpacity); m_frontCard.Draw(Camera); m_backCard.Draw(Camera); m_cancelText.Draw(Camera); Camera.GraphicsDevice.SamplerStates[0] = SamplerState.PointClamp; if (Game.PlayerStats.IsDead) { m_tombStoneSprite.Position = new Vector2(m_frontCard.X + 240f, m_frontCard.Y + 280f); m_tombStoneSprite.Draw(Camera); } else { if (m_playerInAir) { m_playerSprite.Position = new Vector2(m_frontCard.X + 180f, m_frontCard.Y + 202f); } else { m_playerSprite.Position = new Vector2(m_frontCard.X + 160f, m_frontCard.Y + 280f - (m_playerSprite.Bounds.Bottom - m_playerSprite.Y)); } m_playerSprite.Draw(Camera); Game.ColourSwapShader.Parameters["desiredTint"].SetValue( m_playerSprite.GetChildAt(12).TextureColor.ToVector4()); if (Game.PlayerStats.Class == 7 || Game.PlayerStats.Class == 15) { Game.ColourSwapShader.Parameters["Opacity"].SetValue(m_playerSprite.Opacity); Game.ColourSwapShader.Parameters["ColourSwappedOut1"].SetValue(m_skinColour1.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedIn1"].SetValue(m_lichColour1.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedOut2"].SetValue(m_skinColour2.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedIn2"].SetValue(m_lichColour2.ToVector4()); } else if (Game.PlayerStats.Class == 3 || Game.PlayerStats.Class == 11) { Game.ColourSwapShader.Parameters["Opacity"].SetValue(m_playerSprite.Opacity); Game.ColourSwapShader.Parameters["ColourSwappedOut1"].SetValue(m_skinColour1.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedIn1"].SetValue(Color.Black.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedOut2"].SetValue(m_skinColour2.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedIn2"].SetValue(Color.Black.ToVector4()); } else { Game.ColourSwapShader.Parameters["Opacity"].SetValue(1); Game.ColourSwapShader.Parameters["ColourSwappedOut1"].SetValue(m_skinColour1.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedIn1"].SetValue(m_skinColour1.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedOut2"].SetValue(m_skinColour2.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedIn2"].SetValue(m_skinColour2.ToVector4()); } Camera.End(); Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, Game.ColourSwapShader); m_playerSprite.GetChildAt(12).Draw(Camera); Camera.End(); Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null); if (Game.PlayerStats.IsFemale) { m_playerSprite.GetChildAt(13).Draw(Camera); } m_playerSprite.GetChildAt(15).Draw(Camera); } m_spellIcon.Position = new Vector2(m_frontCard.X + 380f, m_frontCard.Y + 320f); m_spellIcon.Draw(Camera); Camera.End(); base.Draw(gametime); }
public override void Draw(GameTime gametime) { base.Camera.GraphicsDevice.SetRenderTarget(m_skyRenderTarget); base.Camera.GraphicsDevice.Clear(Color.Black); base.Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointWrap, null, null); m_sky.Draw(base.Camera); base.Camera.End(); base.Camera.GraphicsDevice.SetRenderTarget(m_backgroundRenderTarget); base.Camera.GraphicsDevice.Clear(Color.Black); base.Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null); m_bg1.Draw(base.Camera); m_bg2.Draw(base.Camera); m_bg3.Draw(base.Camera); m_bgOutside.Draw(base.Camera); m_ground1.Draw(base.Camera); m_ground2.Draw(base.Camera); m_ground3.Draw(base.Camera); m_border1.Draw(base.Camera); m_border2.Draw(base.Camera); m_border3.Draw(base.Camera); m_manor.Draw(base.Camera); m_prop1.Draw(base.Camera); m_prop2.Draw(base.Camera); m_prop3.Draw(base.Camera); m_playerSprite.Draw(base.Camera); EffectParameter item = Game.ColourSwapShader.Parameters["desiredTint"]; Color textureColor = m_playerSprite.GetChildAt(12).TextureColor; item.SetValue(textureColor.ToVector4()); var args = RogueAPI.Game.Player.PipeSkinShaderArgs(this, m_playerSprite); Game.ColourSwapShader.Parameters["Opacity"].SetValue(args.Target.Opacity); Game.ColourSwapShader.Parameters["ColourSwappedOut1"].SetValue(args.Target.ColorSwappedOut1.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedIn1"].SetValue(args.Target.ColorSwappedIn1.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedOut2"].SetValue(args.Target.ColorSwappedOut2.ToVector4()); Game.ColourSwapShader.Parameters["ColourSwappedIn2"].SetValue(args.Target.ColorSwappedIn2.ToVector4()); //if (Game.PlayerStats.Class == 7 || Game.PlayerStats.Class == 15) //{ // Game.ColourSwapShader.Parameters["Opacity"].SetValue(this.m_playerSprite.Opacity); // Game.ColourSwapShader.Parameters["ColourSwappedOut1"].SetValue(this.m_skinColour1.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedIn1"].SetValue(this.m_lichColour1.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedOut2"].SetValue(this.m_skinColour2.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedIn2"].SetValue(this.m_lichColour2.ToVector4()); //} //else if (Game.PlayerStats.Class == 3 || Game.PlayerStats.Class == 11) //{ // Game.ColourSwapShader.Parameters["Opacity"].SetValue(this.m_playerSprite.Opacity); // Game.ColourSwapShader.Parameters["ColourSwappedOut1"].SetValue(this.m_skinColour1.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedIn1"].SetValue(Color.Black.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedOut2"].SetValue(this.m_skinColour2.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedIn2"].SetValue(Color.Black.ToVector4()); //} //else //{ // Game.ColourSwapShader.Parameters["Opacity"].SetValue(1); // Game.ColourSwapShader.Parameters["ColourSwappedOut1"].SetValue(this.m_skinColour1.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedIn1"].SetValue(this.m_skinColour1.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedOut2"].SetValue(this.m_skinColour2.ToVector4()); // Game.ColourSwapShader.Parameters["ColourSwappedIn2"].SetValue(this.m_skinColour2.ToVector4()); //} base.Camera.End(); base.Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, Game.ColourSwapShader); m_playerSprite.GetChildAt(12).Draw(base.Camera); base.Camera.End(); base.Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null); if (Game.PlayerStats.IsFemale) { m_playerSprite.GetChildAt(13).Draw(base.Camera); } m_playerSprite.GetChildAt(15).Draw(base.Camera); m_wifeSprite.Draw(base.Camera); m_childSprite1.Draw(base.Camera); m_childSprite2.Draw(base.Camera); m_sideBorderLeft.Draw(base.Camera); m_sideBorderRight.Draw(base.Camera); m_sideBorderTop.Draw(base.Camera); m_sideBorderBottom.Draw(base.Camera); m_teddy.Draw(base.Camera); m_kenny.Draw(base.Camera); m_glauber.Draw(base.Camera); m_gordon.Draw(base.Camera); m_judson.Draw(base.Camera); base.Camera.End(); base.Camera.GraphicsDevice.SetRenderTarget((base.ScreenManager as RCScreenManager).RenderTarget); base.Camera.GraphicsDevice.Textures[1] = m_skyRenderTarget; base.Camera.GraphicsDevice.Textures[1].GraphicsDevice.SamplerStates[1] = SamplerState.LinearClamp; base.Camera.GraphicsDevice.SetRenderTarget((base.ScreenManager as RCScreenManager).RenderTarget); base.Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, Game.ParallaxEffect); base.Camera.Draw(m_backgroundRenderTarget, Vector2.Zero, Color.White); base.Camera.End(); base.Camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.LinearClamp, null, null); base.Camera.GraphicsDevice.SamplerStates[0] = SamplerState.LinearClamp; Rectangle rectangle = new Rectangle(0, 0, 1320, 720); foreach (TextObj mCreditsTitleList in m_creditsTitleList) { if (!CollisionMath.Intersects(mCreditsTitleList.Bounds, rectangle)) { continue; } mCreditsTitleList.Draw(base.Camera); } foreach (TextObj mCreditsNameList in m_creditsNameList) { if (!CollisionMath.Intersects(mCreditsNameList.Bounds, rectangle)) { continue; } mCreditsNameList.Draw(base.Camera); } m_thanksForPlayingText.Draw(base.Camera); m_totalDeaths.Draw(base.Camera); m_totalPlayTime.Draw(base.Camera); m_continueText.Draw(base.Camera); base.Camera.End(); base.Draw(gametime); }