mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Replace XML codeblock spaces with tabs
This commit is contained in:
parent
5dd76968d8
commit
13f642d959
122 changed files with 2407 additions and 2432 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue