AngeliA
Search Results for

    Show / Hide Table of Contents

    Struct RotateCellScope

    Scope that make rendering cells rotate

    Implements
    IDisposable
    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)
    int pointX

    Orientation point X in global space

    int pointY

    Orientation point Y in global space

    bool keepOriginalRotation

    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()
    Back to top ๐Ÿ„๐Ÿฆโ€โฌ›๐Ÿงฆ๐Ÿˆ๐ŸŽƒ๐Ÿ’“๐ŸŒนโ˜•๐Ÿดโ€โ˜ ๏ธ๐Ÿค