本文整理汇总了C#中Window.SetDefaultOrthographicSize方法的典型用法代码示例。如果您正苦于以下问题:C# Window.SetDefaultOrthographicSize方法的具体用法?C# Window.SetDefaultOrthographicSize怎么用?C# Window.SetDefaultOrthographicSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Window
的用法示例。
在下文中一共展示了Window.SetDefaultOrthographicSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
//.........这里部分代码省略.........
if (window.GetKey(KeyCode.R))
{
ship.SetAdditiveTint(1f, -1f, -1f, 0);
//ship.SetMultiplyTint(2f, 0, 0, 1);
}
if (window.GetKey(KeyCode.N))
{
ship.SetAdditiveTint(0, 0, 0, 0);
//ship.SetMultiplyTint(2f, 0, 0, 1);
}
window.SetClearColor(100, 100, 100);
window.RenderTo(null);
monitor.DrawTexture(screen);
Vector2 newPosition = tiles.GetPosition(2) - Vector2.One * 20f * window.deltaTime;
tiles.SetPosition(2, newPosition);
tiles.DrawSolidColor(0, 1, 1, 1);
tiles2.position.X += 30 * window.deltaTime;
tiles2.DrawSolidColor(1, 1, 0, 1);
particleSystem.Update(window);
//rope.SetDestination(window.mousePosition);
rope.UpdatePhysics(window);
rope.DrawSolidColor(1f, 0f, 1f, 1f);
ship2.position = rope.position + rope.Point2;
ship2.SetAdditiveTint(-1f, 1f, -1f, 0);
ship2.DrawTexture(alien, x, y, alien.Width / 10, height);
particleSystem2.position = ship2.position;
particleSystem2.Update(window);
farTriangles.DrawColor(0f, 0f, 1f, 1f);
triangle.v[4] = window.mouseX;
triangle.v[5] = window.mouseY;
triangle.UpdateVertex();
if (window.HasFocus)
{
triangle.DrawTexture(alien);
}
else
{
window.SetScissorTest(window.Width / 2 - 200, window.Height / 2 - 200, 400, 400);
triangle.DrawColor(1f, 0f, 1f, 1f);
window.SetScissorTest(false);
}
window.SetClearColor(0f, 0f, 0f, 0f);
window.RenderTo(maskedAlien);
maskedBackground.DrawTexture(alien2);
window.SetMaskedBlending();
spriteMask.scale = Vector2.One;
spriteMask.position = new Vector2(150, 100);
spriteMask.DrawTexture(circleMask);
spriteMask.scale = new Vector2(2f, 2.7f);
spriteMask.position = new Vector2(180, 280);
spriteMask.DrawTexture(circleMask2);
window.SetAlphaBlending();
window.SetClearColor(0.5f, 0.5f, 0.5f);
window.RenderTo(null);
maskedObject.DrawTexture(maskedAlien);
if (window.GetKey(KeyCode.Space))
{
mainEffect.enabled = true;
}
if (window.GetKey(KeyCode.Return))
{
mainEffect.enabled = false;
}
if (window.GetKey(KeyCode.Num1))
{
window.SetDefaultOrthographicSize(window.CurrentOrthoGraphicSize + window.deltaTime * 100);
}
colouredTriangle.position = window.mousePosition;
colouredTriangle.pivot = new Vector2(500, 250);
float triggerRight = window.JoystickTriggerRight(0);
float triggerLeft = window.JoystickTriggerLeft(0);
colouredTriangle.scale = new Vector2(1 + triggerLeft, 1 + triggerRight);
colouredTriangle.Draw();
window.Update();
}
}