forked from godotengine/godot
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add master server node
- Loading branch information
Showing
11 changed files
with
511 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="GameServerInfo" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> | ||
<brief_description> | ||
Game server info used by the [MasterServerClient]. | ||
</brief_description> | ||
<description> | ||
Game server info used by the [MasterServerClient]. Used to create or update a game server. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<members> | ||
<member name="description" type="String" setter="set_description" getter="get_description" default=""""> | ||
Description of the game server. | ||
</member> | ||
<member name="game_name" type="String" setter="set_game_name" getter="get_game_name" default=""""> | ||
Name of the game server. | ||
</member> | ||
<member name="id" type="String" setter="set_id" getter="get_id" default=""""> | ||
Id of the game server. Generated after call to create game server. | ||
</member> | ||
<member name="ip_address" type="String" setter="set_ip_address" getter="get_ip_address" default=""""> | ||
Ip address of the game server. | ||
</member> | ||
<member name="max_players" type="int" setter="set_max_players" getter="get_max_players" default="0"> | ||
Max players of the game server. | ||
</member> | ||
<member name="players" type="int" setter="set_players" getter="get_players" default="0"> | ||
Players of the game server. | ||
</member> | ||
<member name="port" type="int" setter="set_port" getter="get_port" default="0"> | ||
Port of the game server. | ||
</member> | ||
<member name="version" type="String" setter="set_version" getter="get_version" default=""""> | ||
Version of the game server. | ||
</member> | ||
</members> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="MasterServerClient" inherits="BlaziumClient" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> | ||
<brief_description> | ||
A node used to connect to a master server. | ||
</brief_description> | ||
<description> | ||
A node used to connect to a master server. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<methods> | ||
<method name="create_game"> | ||
<return type="MasterServerResponse" /> | ||
<param index="0" name="game_server_info" type="GameServerInfo" /> | ||
<description> | ||
Create a game server. | ||
</description> | ||
</method> | ||
<method name="recent_games"> | ||
<return type="MasterServerListResponse" /> | ||
<description> | ||
Get a list of recent games. | ||
</description> | ||
</method> | ||
<method name="update_game"> | ||
<return type="MasterServerResponse" /> | ||
<param index="0" name="game_server_info" type="GameServerInfo" /> | ||
<description> | ||
Update a game server. | ||
</description> | ||
</method> | ||
</methods> | ||
<members> | ||
<member name="game_id" type="String" setter="set_game_id" getter="get_game_id" default=""""> | ||
Game id of the game server. | ||
</member> | ||
<member name="server_url" type="String" setter="set_server_url" getter="get_server_url" default=""https://masterserver.blazium.app/api/v1""> | ||
Set to what url this master server should connect to. | ||
</member> | ||
</members> | ||
</class> |
19 changes: 19 additions & 0 deletions
19
modules/blazium_sdk/doc_classes/MasterServerListResponse.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="MasterServerListResponse" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> | ||
<brief_description> | ||
Response from a list games request. | ||
</brief_description> | ||
<description> | ||
Response from a list games request. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<signals> | ||
<signal name="finished"> | ||
<param index="0" name="result" type="MasterServerResult" /> | ||
<description> | ||
Signal emitted when the request is finished. | ||
</description> | ||
</signal> | ||
</signals> | ||
</class> |
27 changes: 27 additions & 0 deletions
27
modules/blazium_sdk/doc_classes/MasterServerListResult.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="MasterServerListResult" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> | ||
<brief_description> | ||
A result from a [MasterServerListResponse]. | ||
</brief_description> | ||
<description> | ||
A result from a [MasterServerListResponse]. Contains either result or error. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<methods> | ||
<method name="has_error" qualifiers="const"> | ||
<return type="bool" /> | ||
<description> | ||
Returns true if there is an error. | ||
</description> | ||
</method> | ||
</methods> | ||
<members> | ||
<member name="error" type="String" setter="" getter="get_error" default=""""> | ||
The error message. | ||
</member> | ||
<member name="results" type="GameServerInfo[]" setter="" getter="get_results" default="[]"> | ||
The results. | ||
</member> | ||
</members> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="MasterServerResponse" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> | ||
<brief_description> | ||
Response from a create or update game request. | ||
</brief_description> | ||
<description> | ||
Response from a create or update game request. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<signals> | ||
<signal name="finished"> | ||
<param index="0" name="result" type="MasterServerResult" /> | ||
<description> | ||
Signal emitted when the request is finished. | ||
</description> | ||
</signal> | ||
</signals> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="MasterServerResult" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd"> | ||
<brief_description> | ||
A result from a [MasterServerResponse]. | ||
</brief_description> | ||
<description> | ||
A result from a [MasterServerResponse]. Contains either result or error. | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<methods> | ||
<method name="has_error" qualifiers="const"> | ||
<return type="bool" /> | ||
<description> | ||
Returns true if there is an error. | ||
</description> | ||
</method> | ||
</methods> | ||
<members> | ||
<member name="error" type="String" setter="" getter="get_error" default=""""> | ||
Gets the error message. | ||
</member> | ||
<member name="result" type="GameServerInfo" setter="" getter="get_result"> | ||
Gets the result. | ||
</member> | ||
</members> | ||
</class> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.