本文整理汇总了C#中Sprite.SetWithoutInterpolation方法的典型用法代码示例。如果您正苦于以下问题:C# Sprite.SetWithoutInterpolation方法的具体用法?C# Sprite.SetWithoutInterpolation怎么用?C# Sprite.SetWithoutInterpolation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sprite
的用法示例。
在下文中一共展示了Sprite.SetWithoutInterpolation方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddMenuBackground
private void AddMenuBackground()
{
background =
new Sprite(new Material(ShaderFlags.Position2DColoredTextured, "MenuBackground"),
ScreenSpace.Scene.Viewport) { RenderLayer = int.MinValue };
ScreenSpace.Scene.ViewportSizeChanged +=
() => background.SetWithoutInterpolation(ScreenSpace.Scene.Viewport);
//menuScene.SetViewportBackground("MenuBackground");
}
示例2: StartGame
private void StartGame(int level)
{
Clear();
State = GameState.CountDown;
background = new Sprite(new Material(ShaderFlags.Position2DColoredTextured, "Background"),
ScreenSpace.Scene.Viewport) { RenderLayer = int.MinValue };
ScreenSpace.Scene.ViewportSizeChanged +=
() => background.SetWithoutInterpolation(ScreenSpace.Scene.Viewport);
//menuScene.SetViewportBackground("Background");
trees = new TreeManager(Team.HumanYellow);
if (level == 1)
SetupLevel1Trees();
else if (level == 2)
SetupLevel2Trees();
else
SetupLevel3Trees();
trees.GameFinished += SetGameOverState;
trees.GameLost += SetGameOverState;
}
示例3: SetViewportBackground
public void SetViewportBackground(Material material)
{
if (background != null)
Remove(background);
var screen = ScreenSpace.Current;
background = new Sprite(material, screen.Viewport) { RenderLayer = int.MinValue };
ScreenSpace.Current.ViewportSizeChanged +=
() => background.SetWithoutInterpolation(screen.Viewport);
Add(background);
}
示例4: RenderMovingUVSprite
public void RenderMovingUVSprite()
{
var sprite = new Sprite(new Material(ShaderFlags.Position2DTextured, "DeltaEngineLogo"),
Rectangle.One);
sprite.SetWithoutInterpolation(new Rectangle(0, 0, 0.1f, 0.1f));
sprite.FlipMode = FlipMode.Vertical;
sprite.StartMovingUV(Vector2D.One/10);
}
示例5: SetDrawAreaWithoutInterpolation
public void SetDrawAreaWithoutInterpolation()
{
var sprite = new Sprite("DeltaEngineLogoAlpha", Rectangle.Zero);
sprite.SetWithoutInterpolation(Rectangle.One);
sprite.SetWithoutInterpolation(sprite.renderingData);
Assert.AreEqual(Rectangle.One, sprite.DrawArea);
Assert.AreEqual(Rectangle.One, sprite.LastDrawArea);
Assert.AreEqual(sprite.renderingData, sprite.Get<RenderingData>());
}