summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2022-12-07 16:11:39 +0100
committerRaul Santos <raulsntos@gmail.com>2023-01-27 02:04:17 +0100
commita968e514148f3b9be8c1bdff38fffe6972976df2 (patch)
tree5143496843474cd65ebf49e01c3d9ee6921ce1ba /doc/classes
parent4788cb35c12d5e094fe1dd633066e27fd4be7734 (diff)
C#: Renames to follow .NET naming conventions
Renamed C# types and members to use PascalCase and follow .NET naming conventions.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/AABB.xml2
-rw-r--r--doc/classes/AStarGrid2D.xml8
-rw-r--r--doc/classes/AnimationNodeStateMachineTransition.xml2
-rw-r--r--doc/classes/Image.xml2
-rw-r--r--doc/classes/Rect2i.xml6
-rw-r--r--doc/classes/TextEdit.xml8
6 files changed, 14 insertions, 14 deletions
diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml
index ca454cafa3..2c5337eea3 100644
--- a/doc/classes/AABB.xml
+++ b/doc/classes/AABB.xml
@@ -66,7 +66,7 @@
[/gdscript]
[csharp]
// position (-3, 2, 0), size (1, 1, 1)
- var box = new AABB(new Vector3(-3, 2, 0), new Vector3(1, 1, 1));
+ var box = new Aabb(new Vector3(-3, 2, 0), new Vector3(1, 1, 1));
// position (-3, -1, 0), size (3, 4, 2), so we fit both the original AABB and Vector3(0, -1, 2)
var box2 = box.Expand(new Vector3(0, -1, 2));
[/csharp]
diff --git a/doc/classes/AStarGrid2D.xml b/doc/classes/AStarGrid2D.xml
index 32599d7f7d..b253a33377 100644
--- a/doc/classes/AStarGrid2D.xml
+++ b/doc/classes/AStarGrid2D.xml
@@ -17,11 +17,11 @@
[/gdscript]
[csharp]
AStarGrid2D astarGrid = new AStarGrid2D();
- astarGrid.Size = new Vector2i(32, 32);
- astarGrid.CellSize = new Vector2i(16, 16);
+ astarGrid.Size = new Vector2I(32, 32);
+ astarGrid.CellSize = new Vector2I(16, 16);
astarGrid.Update();
- GD.Print(astarGrid.GetIdPath(Vector2i.Zero, new Vector2i(3, 4))); // prints (0, 0), (1, 1), (2, 2), (3, 3), (3, 4)
- GD.Print(astarGrid.GetPointPath(Vector2i.Zero, new Vector2i(3, 4))); // prints (0, 0), (16, 16), (32, 32), (48, 48), (48, 64)
+ GD.Print(astarGrid.GetIdPath(Vector2I.Zero, new Vector2I(3, 4))); // prints (0, 0), (1, 1), (2, 2), (3, 3), (3, 4)
+ GD.Print(astarGrid.GetPointPath(Vector2I.Zero, new Vector2I(3, 4))); // prints (0, 0), (16, 16), (32, 32), (48, 48), (48, 64)
[/csharp]
[/codeblocks]
</description>
diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml
index eee25fad7c..bccab4613a 100644
--- a/doc/classes/AnimationNodeStateMachineTransition.xml
+++ b/doc/classes/AnimationNodeStateMachineTransition.xml
@@ -15,7 +15,7 @@
$animation_tree.set("parameters/conditions/idle", is_on_floor and (linear_velocity.x == 0))
[/gdscript]
[csharp]
- GetNode&lt;AnimationTree&gt;("animation_tree").Set("parameters/conditions/idle", IsOnFloor &amp;&amp; (LinearVelocity.x == 0));
+ GetNode&lt;AnimationTree&gt;("animation_tree").Set("parameters/conditions/idle", IsOnFloor &amp;&amp; (LinearVelocity.X == 0));
[/csharp]
[/codeblocks]
</member>
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index 051e087611..b13564cfef 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -525,7 +525,7 @@
var img = new Image();
img.Create(imgWidth, imgHeight, false, Image.Format.Rgba8);
- img.SetPixelv(new Vector2i(1, 2), Colors.Red); // Sets the color at (1, 2) to red.
+ img.SetPixelv(new Vector2I(1, 2), Colors.Red); // Sets the color at (1, 2) to red.
[/csharp]
[/codeblocks]
This is the same as [method set_pixel], but with a [Vector2i] argument instead of two integer arguments.
diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml
index 325ead0cfa..80a9b40605 100644
--- a/doc/classes/Rect2i.xml
+++ b/doc/classes/Rect2i.xml
@@ -80,9 +80,9 @@
[/gdscript]
[csharp]
// position (-3, 2), size (1, 1)
- var rect = new Rect2i(new Vector2i(-3, 2), new Vector2i(1, 1));
- // position (-3, -1), size (3, 4), so we fit both rect and Vector2i(0, -1)
- var rect2 = rect.Expand(new Vector2i(0, -1));
+ var rect = new Rect2I(new Vector2I(-3, 2), new Vector2I(1, 1));
+ // position (-3, -1), size (3, 4), so we fit both rect and Vector2I(0, -1)
+ var rect2 = rect.Expand(new Vector2I(0, -1));
[/csharp]
[/codeblocks]
</description>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index ccd79cd170..dfbfce8c76 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -770,12 +770,12 @@
var column_number = result.x
[/gdscript]
[csharp]
- Vector2i result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0);
- if (result.Length &gt; 0)
+ Vector2I result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0);
+ if (result.X != -1)
{
// Result found.
- int lineNumber = result.y;
- int columnNumber = result.x;
+ int lineNumber = result.Y;
+ int columnNumber = result.X;
}
[/csharp]
[/codeblocks]