Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dannevesdantas/webapi2construct
WebAPI2Construct simplifies the integration of ASP.NET Web API with Construct game engine by Scirra
https://github.com/dannevesdantas/webapi2construct
construct2 construct3
Last synced: about 2 months ago
JSON representation
WebAPI2Construct simplifies the integration of ASP.NET Web API with Construct game engine by Scirra
- Host: GitHub
- URL: https://github.com/dannevesdantas/webapi2construct
- Owner: dannevesdantas
- License: apache-2.0
- Created: 2014-12-08T00:01:21.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-08T06:32:12.000Z (about 2 years ago)
- Last Synced: 2024-04-29T22:07:16.748Z (9 months ago)
- Topics: construct2, construct3
- Language: C#
- Homepage: https://www.construct.net/en/tutorials/using-ajax-object-asp-net-web-832
- Size: 8.39 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WebAPI2Construct
WebAPI2Construct simplifies the integration of [ASP.NET Web API](http://www.asp.net/web-api) with [Construct game engine by Scirra](https://www.construct.net/)
## What can it be used for?
If you are developing a game with Construct game engine and want to save, load, delete or update game's data from a server and/or a database you can use Microsoft ASP.NET WEB API with WebAPI2Construct to format the game's data in a format that Construct can understand when sending it from the ASP.NET server to the game.## How to Use
Use `Construct2Convert.ToDictionary()` method to convert any C# object to a Construct Dictionary formatted object.
```csharp
[Route("player/data")]
[HttpGet]
public async Task> GetPlayerData()
{
// An example object with the data to be sent to the game
PlayerData playerData = new PlayerData();
playerData.PlayerName = "John";
playerData.HiScore = 999;// Use WebAPI2Construct to transform your data in a Construct readable format
var playerDataJSONDictionary = Construct2Convert.ToDictionary(playerData);return Ok(playerDataJSONDictionary); // Send the data to the game
}
```## Tutorial
Visit Using AJAX object with ASP.NET Web API tutorial at [https://www.construct.net/en/tutorials/using-ajax-object-asp-net-web-832](https://www.construct.net/en/tutorials/using-ajax-object-asp-net-web-832)## Get it on NuGet
Install-Package WebAPI2Construct## LICENSE
[Apache 2.0 License](https://github.com/dannevesdantas/WebAPI2Construct/blob/master/LICENSE)