diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 79e74c4cc4a..ed234a57eb1 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -21,11 +21,11 @@ var array = new Godot.Collections.Array{"First", 2, 3, "Last"}; GD.Print(array[0]); // Prints "First" GD.Print(array[2]); // Prints 3 - GD.Print(array[array.Count - 1]); // Prints "Last" + GD.Print(array[^1]); // Prints "Last" - array[2] = "Second"; + array[1] = "Second"; GD.Print(array[1]); // Prints "Second" - GD.Print(array[array.Count - 3]); // Prints "Second" + GD.Print(array[^3]); // Prints "Second" [/csharp] [/codeblocks] [b]Note:[/b] Arrays are always passed by [b]reference[/b]. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml index 41e241779a9..7fc45d80bf8 100644 --- a/doc/classes/DTLSServer.xml +++ b/doc/classes/DTLSServer.xml @@ -19,7 +19,7 @@ server.listen(4242) var key = load("key.key") # Your private key. var cert = load("cert.crt") # Your X509 certificate. - dtls.setup(key, cert) + dtls.setup(TlsOptions.server(key, cert)) func _process(delta): while server.is_connection_available(): @@ -52,12 +52,12 @@ _server.Listen(4242); var key = GD.Load<CryptoKey>("key.key"); // Your private key. var cert = GD.Load<X509Certificate>("cert.crt"); // Your X509 certificate. - _dtls.Setup(key, cert); + _dtls.Setup(TlsOptions.Server(key, cert)); } public override void _Process(double delta) { - while (Server.IsConnectionAvailable()) + while (_server.IsConnectionAvailable()) { PacketPeerUdp peer = _server.TakeConnection(); PacketPeerDtls dtlsPeer = _dtls.TakeConnection(peer); diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index ca155881c8e..64ff78e647a 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -638,13 +638,13 @@ [/gdscript] [csharp] // Set region, using Path2D node. - GetNode<Window>("Window").MousePassthrough = GetNode<Path2D>("Path2D").Curve.GetBakedPoints(); + GetNode<Window>("Window").MousePassthroughPolygon = GetNode<Path2D>("Path2D").Curve.GetBakedPoints(); // Set region, using Polygon2D node. - GetNode<Window>("Window").MousePassthrough = GetNode<Polygon2D>("Polygon2D").Polygon; + GetNode<Window>("Window").MousePassthroughPolygon = GetNode<Polygon2D>("Polygon2D").Polygon; // Reset region to default. - GetNode<Window>("Window").MousePassthrough = new Vector2[] {}; + GetNode<Window>("Window").MousePassthroughPolygon = new Vector2[] {}; [/csharp] [/codeblocks] [b]Note:[/b] This property is ignored if [member mouse_passthrough] is set to [code]true[/code].