mirror of
https://github.com/godotengine/godot.git
synced 2024-12-03 09:52:18 +08:00
9fcf3b5a9c
`PackedScene`s can be configured to be spawnable via a new `MultiplayerAPI.spawnable_config` method. They can be configured either to be spawned automatically when coming from the server or to always require verification. Another method, `MultiplayerAPI.send_spawn` lets you request a spawn on the remote peers. When a peer receive a spawn request: - If it comes from the server and the scene is configured as `SPAWN_MODE_SERVER`: - Spawn the scene (instantiate it, add it to tree). - Emit signal `network_spawn`. - Else: - Emit signal `network_spawn_request`. In a similar way, `despawn`s are handled automatically in `SPAWN_MODE_SERVER`. In `SPAWN_MODE_SERVER`, when a new client connects it will also receive, from the server all the spawned (and not yet despawned) instances. |
||
---|---|---|
.. | ||
compression.cpp | ||
compression.h | ||
config_file.cpp | ||
config_file.h | ||
dir_access.cpp | ||
dir_access.h | ||
dtls_server.cpp | ||
dtls_server.h | ||
file_access_compressed.cpp | ||
file_access_compressed.h | ||
file_access_encrypted.cpp | ||
file_access_encrypted.h | ||
file_access_memory.cpp | ||
file_access_memory.h | ||
file_access_network.cpp | ||
file_access_network.h | ||
file_access_pack.cpp | ||
file_access_pack.h | ||
file_access_zip.cpp | ||
file_access_zip.h | ||
file_access.cpp | ||
file_access.h | ||
http_client_tcp.cpp | ||
http_client_tcp.h | ||
http_client.cpp | ||
http_client.h | ||
image_loader.cpp | ||
image_loader.h | ||
image.cpp | ||
image.h | ||
ip_address.cpp | ||
ip_address.h | ||
ip.cpp | ||
ip.h | ||
json.cpp | ||
json.h | ||
logger.cpp | ||
logger.h | ||
marshalls.cpp | ||
marshalls.h | ||
multiplayer_api.cpp | ||
multiplayer_api.h | ||
multiplayer_peer.cpp | ||
multiplayer_peer.h | ||
net_socket.cpp | ||
net_socket.h | ||
packed_data_container.cpp | ||
packed_data_container.h | ||
packet_peer_dtls.cpp | ||
packet_peer_dtls.h | ||
packet_peer_udp.cpp | ||
packet_peer_udp.h | ||
packet_peer.cpp | ||
packet_peer.h | ||
pck_packer.cpp | ||
pck_packer.h | ||
resource_format_binary.cpp | ||
resource_format_binary.h | ||
resource_importer.cpp | ||
resource_importer.h | ||
resource_loader.cpp | ||
resource_loader.h | ||
resource_saver.cpp | ||
resource_saver.h | ||
resource_uid.cpp | ||
resource_uid.h | ||
resource.cpp | ||
resource.h | ||
SCsub | ||
stream_peer_ssl.cpp | ||
stream_peer_ssl.h | ||
stream_peer_tcp.cpp | ||
stream_peer_tcp.h | ||
stream_peer.cpp | ||
stream_peer.h | ||
tcp_server.cpp | ||
tcp_server.h | ||
translation_loader_po.cpp | ||
translation_loader_po.h | ||
udp_server.cpp | ||
udp_server.h | ||
xml_parser.cpp | ||
xml_parser.h | ||
zip_io.cpp | ||
zip_io.h |