SpriteTests RenderMainSpriteWithAttachedSubSprite Method Delta Engine Documentation

Namespace: DeltaEngine.Rendering2D.Tests
Assembly: DeltaEngine.Rendering2D.Tests (in DeltaEngine.Rendering2D.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void RenderMainSpriteWithAttachedSubSprite()
Examples

[Test]
public void RenderMainSpriteWithAttachedSubSprite()
{
    var mainSprite = new Sprite(logoMaterial, Rectangle.HalfCentered);
    mainSprite.Add<Sprite>(new Sprite(logoMaterial, Rectangle.FromCenter(0.5f, 0.5f, 0.1f, 0.1f)));
    mainSprite.Start<UpdateClientSpriteOnPositionChange>();
    new Command(Command.Click, position => mainSprite.Center = position);
}
See Also