Table of Contents

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

R Rect2

Godot.Rect2 that 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.

public static bool Contains(this Rect2 rect, in Vector2D mousePosition)

Parameters

rect Rect2

The 2D rectangle to be used.

mousePosition Vector2D

The mouse position to be compared.

Returns

bool

Returns true when the mouse position is inside the 2D rectangle.

Left(Rect2)

Gets the left position of Godot.Rect2.

public static float Left(this Rect2 R)

Parameters

R Rect2

Godot.Rect2 that 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

R Rect2

Godot.Rect2 that 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

R Rect2

Godot.Rect2 that will be used.

Returns

float

Returns a floating-point with the top position of Godot.Rect2.