2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-09-09 03:01:41 -04:00

Split Enums, Structs & Classes into own files

This commit is contained in:
2021-10-24 20:59:05 +11:00
parent 882b42f47d
commit 7f531ff27a
50 changed files with 1956 additions and 1783 deletions

38
Raylib-cs/Camera2D.cs Normal file
View File

@@ -0,0 +1,38 @@
using System.Numerics;
using System.Runtime.InteropServices;
namespace Raylib_cs
{
/// <summary>Camera2D, defines position/orientation in 2d space</summary>
[StructLayout(LayoutKind.Sequential)]
public struct Camera2D
{
/// <summary>
/// Camera offset (displacement from target)
/// </summary>
public Vector2 offset;
/// <summary>
/// Camera target (rotation and zoom origin)
/// </summary>
public Vector2 target;
/// <summary>
/// Camera rotation in degrees
/// </summary>
public float rotation;
/// <summary>
/// Camera zoom (scaling), should be 1.0f by default
/// </summary>
public float zoom;
public Camera2D(Vector2 offset, Vector2 target, float rotation, float zoom)
{
this.offset = offset;
this.target = target;
this.rotation = rotation;
this.zoom = zoom;
}
}
}