Replace XML codeblock spaces with tabs

This commit is contained in:
kobewi 2025-05-17 20:00:17 +02:00 committed by Rémi Verschelde
parent 5dd76968d8
commit 13f642d959
No known key found for this signature in database
GPG key ID: C3336907360768E1
122 changed files with 2407 additions and 2432 deletions

View file

@ -20,15 +20,15 @@
var peer
func _ready():
peer = PacketPeerUDP.new()
peer.bind(4433)
peer = PacketPeerUDP.new()
peer.bind(4433)
func _process(_delta):
if peer.get_available_packet_count() > 0:
var array_bytes = peer.get_packet()
var packet_string = array_bytes.get_string_from_ascii()
print("Received message: ", packet_string)
if peer.get_available_packet_count() > 0:
var array_bytes = peer.get_packet()
var packet_string = array_bytes.get_string_from_ascii()
print("Received message: ", packet_string)
[/codeblock]
[b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android.
</description>
@ -141,9 +141,9 @@
# Client
while socket.wait() == OK:
var data = socket.get_packet().get_string_from_ascii()
if data == "Time to stop":
return
var data = socket.get_packet().get_string_from_ascii()
if data == "Time to stop":
return
[/gdscript]
[csharp]
var socket = new PacketPeerUdp();
@ -154,11 +154,11 @@
// Client
while (socket.Wait() == OK)
{
string data = socket.GetPacket().GetStringFromASCII();
if (data == "Time to stop")
{
return;
}
string data = socket.GetPacket().GetStringFromASCII();
if (data == "Time to stop")
{
return;
}
}
[/csharp]
[/codeblocks]