{"id":19903267,"url":"https://github.com/nethereum/nethereum-stride-integrationexample","last_synced_at":"2025-10-23T15:32:18.457Z","repository":{"id":195533113,"uuid":"693106949","full_name":"Nethereum/Nethereum-Stride-IntegrationExample","owner":"Nethereum","description":"Nethereum Stride integration example","archived":false,"fork":false,"pushed_at":"2023-09-18T11:26:34.000Z","size":48580,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-11T21:25:10.507Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nethereum.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-18T11:12:03.000Z","updated_at":"2023-09-18T11:23:01.000Z","dependencies_parsed_at":"2023-09-18T13:21:47.287Z","dependency_job_id":null,"html_url":"https://github.com/Nethereum/Nethereum-Stride-IntegrationExample","commit_stats":null,"previous_names":["nethereum/nethereum-stride-integrationexample"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nethereum%2FNethereum-Stride-IntegrationExample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nethereum%2FNethereum-Stride-IntegrationExample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nethereum%2FNethereum-Stride-IntegrationExample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nethereum%2FNethereum-Stride-IntegrationExample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nethereum","download_url":"https://codeload.github.com/Nethereum/Nethereum-Stride-IntegrationExample/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241330843,"owners_count":19945239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T20:22:53.053Z","updated_at":"2025-10-23T15:32:18.408Z","avatar_url":"https://github.com/Nethereum.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nethereum-Stride-IntegrationExample\nNethereum Stride integration example using Stride's Jumpy Jet example: https://github.com/stride3d/stride/tree/master/samples/Games/JumpyJet\n\nThis simple integration, uses directly the Nethereum.Web3 Nuget, retrieving a block number in a background thread and then is diplayed in the UI component.\n\n![example integration](./screenshots/stride-nethereum-jumpyjet-blocknumber.gif)\n\n## Background thread\n```csharp\n\n    public class BlockNumberScript : AsyncScript\n    {\n        public override async Task Execute()\n        {\n            var web3 = new Web3();\n            while (Game.IsRunning)\n            {\n                try\n                {\n                    var blockNumber = await web3.Eth.Blocks.GetBlockNumber.SendRequestAsync();\n                    GameGlobals.BlockNumberEventKey.Broadcast((long)blockNumber.Value);\n                    await Task.Delay(1000);\n\n                }\n                catch(Exception ex)\n                {\n                    Debug.WriteLine(ex);\n                }\n                \n            }\n           \n           \n        }\n    }\n\n```\n\n## UI\n```csharp\n public class UIScript : SyncScript\n {\n private EventReceiver\u003clong\u003e blockNumberListener = new EventReceiver\u003clong\u003e(GameGlobals.BlockNumberEventKey);\n\n public override void Update()\n        {\n          \n            if (blockNumberListener.TryReceive(out currentBlockNumber))\n            {\n                blockNumberTextBlock.Text = @$\"Block: {currentBlockNumber}\";\n            }  \n        }\n        private void CreateGameUI()\n        {\n           \n\n            blockNumberTextBlock = new TextBlock\n            {\n                Font = Font,\n                TextColor = Color.Black,\n                VerticalAlignment = VerticalAlignment.Center\n            };\n            blockNumberTextBlock.SetCanvasPinOrigin(new Vector3(300f, 0.5f, 1f));\n            blockNumberTextBlock.SetCanvasRelativePosition(new Vector3(300f, 0.7f, 0f));\n\n            var blockNumberBoard = new ContentDecorator\n            {\n                BackgroundImage = SpriteFromSheet.Create(UIImages, \"score_bg\"),\n                Content = blockNumberTextBlock,\n                Padding = new Thickness(100, 31, 25, 35),\n                MinimumWidth = 190f \n            };\n\n            gameRoot = new Canvas();\n            gameRoot.Children.Add(scoreBoard);\n            gameRoot.Children.Add(blockNumberBoard);\n        }\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnethereum%2Fnethereum-stride-integrationexample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnethereum%2Fnethereum-stride-integrationexample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnethereum%2Fnethereum-stride-integrationexample/lists"}