diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 79e74c4cc4a7..ed234a57eb12 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 41e241779a9b..9274663b6e37 100644 --- a/doc/classes/DTLSServer.xml +++ b/doc/classes/DTLSServer.xml @@ -28,7 +28,7 @@ if dtls_peer.get_status() != PacketPeerDTLS.STATUS_HANDSHAKING: continue # It is normal that 50% of the connections fails due to cookie exchange. print("Peer connected!") - peers.append(dtls_peer) + peers.append(TlsOptions.server(dtls_peer)) for p in peers: p.poll() # Must poll to update the state. @@ -57,7 +57,7 @@ public override void _Process(double delta) { - while (Server.IsConnectionAvailable()) + while (_server.IsConnectionAvailable()) { PacketPeerUdp peer = _server.TakeConnection(); PacketPeerDtls dtlsPeer = _dtls.TakeConnection(peer); @@ -66,7 +66,7 @@ continue; // It is normal that 50% of the connections fails due to cookie exchange. } GD.Print("Peer connected!"); - _peers.Add(dtlsPeer); + _peers.Add(TlsOptions.Server(dtlsPeer)); } foreach (var p in _peers) diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index ca155881c8ed..64ff78e647a4 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].