本文整理汇总了C#中Camera2D.GetTransformation方法的典型用法代码示例。如果您正苦于以下问题:C# Camera2D.GetTransformation方法的具体用法?C# Camera2D.GetTransformation怎么用?C# Camera2D.GetTransformation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Camera2D
的用法示例。
在下文中一共展示了Camera2D.GetTransformation方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Draw
public override void Draw(Camera2D camera)
{
if (this.m_boss.IsKilled && Game.PlayerStats.Traits.X != 1f && Game.PlayerStats.Traits.Y != 1f)
{
camera.End();
this.m_boss.StopAnimation();
Game.HSVEffect.Parameters["Saturation"].SetValue(0);
camera.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointWrap, null, null, Game.HSVEffect, camera.GetTransformation());
this.m_boss.Visible = true;
this.m_boss.Draw(camera);
this.m_boss.Visible = false;
camera.End();
camera.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointWrap, null, null, null, camera.GetTransformation());
}
base.Draw(camera);
}
示例2: Draw
public override void Draw(Camera2D camera)
{
this.m_continueText.Position = new Vector2((float)(camera.Bounds.Right - 50), (float)(camera.Bounds.Bottom - 70));
this.m_endingMask.Position = camera.Position - new Vector2(660f, 360f);
this.m_endingMask.Draw(camera);
if (camera.X > this.m_background.X + 6600f)
{
this.m_background.X = camera.X;
}
if (camera.X < this.m_background.X)
{
this.m_background.X = camera.X - 1320f;
}
this.m_background.Draw(camera);
foreach (SpriteObj current in this.m_frameList)
{
current.Draw(camera);
}
foreach (SpriteObj current2 in this.m_plaqueList)
{
current2.Draw(camera);
}
base.Draw(camera);
camera.End();
if (!LevelEV.SHOW_ENEMY_RADII)
{
camera.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, null, null, null, camera.GetTransformation());
}
else
{
camera.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.LinearClamp, null, null, null, camera.GetTransformation());
}
foreach (TextObj current3 in this.m_nameList)
{
current3.Draw(camera);
}
foreach (TextObj current4 in this.m_slainCountText)
{
current4.Draw(camera);
}
this.m_continueText.Draw(camera);
camera.End();
if (!LevelEV.SHOW_ENEMY_RADII)
{
camera.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointWrap, null, null, null, camera.GetTransformation());
return;
}
camera.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointWrap, null, null, null, camera.GetTransformation());
}
示例3: Draw
public override void Draw(Camera2D camera)
{
if (this.FlipPortrait)
{
this.m_playerSprite.Rotation = 180f;
}
if (!this.m_frameDropping)
{
this.m_frameSprite.Position = base.Position;
this.m_frameSprite.Y -= 12f;
this.m_frameSprite.X += 5f;
}
this.m_frameSprite.Opacity = base.Opacity;
this.m_frameSprite.Draw(camera);
if (!this.IsDead && this.Spell != 0)
{
this.m_spellIconHolder.Position = new Vector2(this.m_frameSprite.X, (float)(this.m_frameSprite.Bounds.Bottom - 20));
this.m_spellIcon.Position = this.m_spellIconHolder.Position;
this.m_spellIconHolder.Draw(camera);
this.m_spellIcon.Draw(camera);
}
this.m_playerSprite.OutlineColour = this.OutlineColour;
this.m_playerSprite.OutlineWidth = base.OutlineWidth;
if (!this.m_frameDropping)
{
this.m_playerSprite.Position = base.Position;
this.m_playerSprite.X += 10f;
if (this.FlipPortrait)
{
this.m_playerSprite.X -= 10f;
this.m_playerSprite.Y -= 30f;
}
}
this.m_playerSprite.Opacity = base.Opacity;
this.m_playerSprite.Draw(camera);
if (CollisionMath.Intersects(this.Bounds, camera.Bounds))
{
if (this.Class == 7 || this.Class == 15)
{
Game.ColourSwapShader.Parameters["desiredTint"].SetValue(Color.White.ToVector4());
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());
camera.End();
camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, Game.ColourSwapShader, camera.GetTransformation());
this.m_playerSprite.GetChildAt(12).Draw(camera);
camera.End();
camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, camera.GetTransformation());
if (this.IsFemale)
{
this.m_playerSprite.GetChildAt(13).Draw(camera);
}
this.m_playerSprite.GetChildAt(15).Draw(camera);
}
else if (this.Class == 3 || this.Class == 11)
{
Game.ColourSwapShader.Parameters["desiredTint"].SetValue(Color.White.ToVector4());
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());
camera.End();
camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, Game.ColourSwapShader, camera.GetTransformation());
this.m_playerSprite.GetChildAt(12).Draw(camera);
camera.End();
camera.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, camera.GetTransformation());
if (this.IsFemale)
{
this.m_playerSprite.GetChildAt(13).Draw(camera);
}
this.m_playerSprite.GetChildAt(15).Draw(camera);
}
}
if (!this.DisablePlaque)
{
if (!this.m_frameDropping)
{
this.m_plaqueSprite.Position = base.Position;
this.m_plaqueSprite.X += 5f;
this.m_plaqueSprite.Y = this.m_frameSprite.Y + (float)this.m_frameSprite.Height - 30f;
}
this.m_plaqueSprite.Draw(camera);
camera.GraphicsDevice.SamplerStates[0] = SamplerState.LinearClamp;
base.Draw(camera);
camera.GraphicsDevice.SamplerStates[0] = SamplerState.PointClamp;
}
if (this.m_frameDropping)
{
this.m_frameSprite.Draw(camera);
this.m_playerSprite.Draw(camera);
}
}
示例4: Draw
public override void Draw(Camera2D camera)
{
this.m_swearBubble.Scale = new Vector2(this.ScaleX * 1.2f, this.ScaleY * 1.2f);
this.m_swearBubble.Position = new Vector2(base.X - 30f * this.ScaleX, base.Y - 35f * this.ScaleX);
this.m_swearBubble.Draw(camera);
this.m_translocatorSprite.Draw(camera);
base.Draw(camera);
if (this.IsFlying && base.State != 9)
{
this.m_flightDurationText.Text = string.Format("{0:F1}", this.m_flightCounter);
this.m_flightDurationText.Position = new Vector2(base.X, (float)(this.TerrainBounds.Top - 70));
this.m_flightDurationText.Draw(camera);
}
camera.End();
Game.ColourSwapShader.Parameters["desiredTint"].SetValue(this.m_playerHead.TextureColor.ToVector4());
if (Game.PlayerStats.Class == 7 || Game.PlayerStats.Class == 15)
{
Game.ColourSwapShader.Parameters["Opacity"].SetValue(base.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(base.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(base.Opacity);
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.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, Game.ColourSwapShader, camera.GetTransformation());
this.m_playerHead.Draw(camera);
camera.End();
camera.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, camera.GetTransformation());
if (Game.PlayerStats.IsFemale)
{
this._objectList[13].Draw(camera);
}
this._objectList[14].Draw(camera);
this._objectList[15].Draw(camera);
}