Class Rect2_GD_CB_Extension
- Namespace
- Godot
- Assembly
- com.cobilas.godot.utility.dll
Extension to the Godot.Rect2 struct.
public static class Rect2_GD_CB_Extension
- Inheritance
-
Rect2_GD_CB_Extension
- Inherited Members
Methods
Bottom(Rect2)
Gets the bottom position of Godot.Rect2.
public static float Bottom(this Rect2 R)
Parameters
RRect2Godot.Rect2That will be used.
Returns
- float
Returns a floating-point value with the bottom position of Godot.Rect2.
Contains(Rect2, in Vector2D)
Allows you to check if the mouse position is inside the 2D rectangle.
[Obsolete("Use Rect2.HasPoint(Vector2)")]
public static bool Contains(this Rect2 rect, in Vector2D mousePosition)
Parameters
rectRect2The 2D rectangle to be used.
mousePositionVector2DThe mouse position to be compared.
Returns
- bool
Returns
truewhen the mouse position is inside the 2D rectangle.
Height(Rect2)
Get the height of the Godot.Rect2
public static float Height(this Rect2 R)
Parameters
RRect2That will be used.
Returns
- float
Returns a floating-point right height of Godot.Rect2.
Left(Rect2)
Gets the left position of Godot.Rect2.
public static float Left(this Rect2 R)
Parameters
RRect2Godot.Rect2That will be used.
Returns
- float
Returns a floating-point left position of Godot.Rect2.
Right(Rect2)
Gets the right position of Godot.Rect2.
public static float Right(this Rect2 R)
Parameters
RRect2Godot.Rect2That will be used.
Returns
- float
Returns a floating-point right position of Godot.Rect2.
Top(Rect2)
Gets the top position of Godot.Rect2.
public static float Top(this Rect2 R)
Parameters
RRect2Godot.Rect2That will be used.
Returns
- float
Returns a floating-point with the top position of Godot.Rect2.
Width(Rect2)
Get the width of the Godot.Rect2
public static float Width(this Rect2 R)
Parameters
RRect2That will be used.
Returns
- float
Returns a floating-point right width of Godot.Rect2.