Pārlūkot izejas kodu

async and raycasting youtube video

Aggror Desktop 3 gadi atpakaļ
vecāks
revīzija
19eee3fd67

+ 5 - 4
en/tutorials/csharpintermediate/async-scripts.md

@@ -5,15 +5,16 @@ This C# Intermediate tutorial covers the usage of asynchronous scripts or 'async
 
 With Async scripts we can perform heavy duty operations or reach out to an api without it freezing our application. A game can be made entirely with either Sync or Async scripts, or a combination of them both. 
 
-<iframe width="560" height="315" src="https://www.youtube.com/embed/..." frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+<iframe width="560" height="315" src="https://www.youtube.com/embed/xWozou1AJGM" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 
 ## Code
+### Retrieving data from a web api
+A common usecase for async scripts, is retrieving data from a web API. Depending on the speed of the API and the amount of data to be be retrieved this mostly take up somewhere between 20 milliseconds and 2 seconds. 
+[!code-csharp[AsyncWebApi](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\05_Async\AsyncWebApi.cs)]
+
 ### Async Collision trigger
 In a previous tutorial we made a collision trigger script that would notify the user once an object is passing through it. We can make a similar script using Async script.
 [!code-csharp[AsyncCollisionTrigger](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\05_Async\AsyncCollisionTriggerDemo.cs)]
 
-### Retrieving data from a web api
-Another common usecase for async scripts, is retrieving data from a web API. Depending on the speed of the API and the amount of data to be be retrieved this mostly take up somewhere between 20 milliseconds and 2 seconds. 
-[!code-csharp[AsyncWebApi](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\05_Async\AsyncWebApi.cs)]
 
 

+ 1 - 1
en/tutorials/csharpintermediate/raycasting.md

@@ -3,7 +3,7 @@
 ## Explanation
 This C# Intermediate tutorial covers raycasting. Raycasting is an essential subject in 3d games. With raycasts we can detect if and what kinds of objects are in our line of sight. This can used for detecting enemies or how far an object really is. 
 
-<iframe width="560" height="315" src="https://www.youtube.com/embed/25ibO2YoEFE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+<iframe width="560" height="315" src="https://www.youtube.com/embed/uIM6jxM7OyE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 
 ## Code
 ### Raycast