Struct RotateCellScope
Scope that make rendering cells rotate
Implements
Examples
using AngeliA;
namespace AngeliaGame;
public class Example {
[OnGameUpdate]
internal static void OnGameUpdate () {
var cameraRect = Renderer.CameraRect;
int rot = QTest.Int("Rot", 0, 0, 360);
int pointX = QTest.Int("Pivot X", 4096, 0, 4096 * 2);
int pointY = QTest.Int("Pivot Y", 2048, 0, 4096);
QTest.Mark(new Int2(cameraRect.x + pointX, cameraRect.y + pointY));
using (var scroll = new RotateCellScope(rot, cameraRect.x + pointX, cameraRect.y + pointY)) {
Renderer.Draw(
BuiltInSprite.ICON_ENTITY,
cameraRect.CenterX(), cameraRect.CenterY(),
500, 500, 0, 512, 512
);
}
}
}
Constructors
RotateCellScope()
Scope that make rendering cells rotate
Declaration
public RotateCellScope()
RotateCellScope(int, int, int, bool)
Scope that make rendering cells rotate
Declaration
public RotateCellScope(int rotation, int pointX = -2147483648, int pointY = -2147483648, bool keepOriginalRotation = false)
Orientation point X in global space
Orientation point Y in global space
True if only change the position of cells (not rotation)
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()