浏览代码

lots of typing/editing

Aggror Desktop 3 年之前
父节点
当前提交
164fa96114

+ 1 - 5
en/tutorials/csharpintermediate/animation-basics.md

@@ -1,13 +1,9 @@
-# Virtual buttons
-You can find this sample in the tutorial project: **Menu** → **Virtual buttons** 
+# Animation basics
 
 ## Explanation
 This C# Beginner tutorial covers how to create virtual buttons. Lets say that you want a player to jump when a key is pressed. The space bar is a common option, but what if a gamer wants to have a different key bind to this 'Jump' action? The answer here is the 'Virtual button'. Virtual buttons allow the mapping of one or more keyboard keys, mouse buttons or joystick buttons to a single 'Virtual button'. We can check for the name of that virtual button to see if any of the virtual buttons are triggered.
 
-![Virtual buttons](media/virtual-buttons.png)
-
 <iframe width="560" height="315" src="https://www.youtube.com/embed/uWgson2IIhs" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 
-
 ## Code
 [!code-csharp[VirtualButtons](..\..\..\..\stride\samples\Tutorials\CSharpBeginner\CSharpBeginner\CSharpBeginner.Game\Code\VirtualButtonsDemo.cs)]

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

@@ -1,14 +1,10 @@
-# Editor properties
-You can find this sample in the tutorial project: **Menu** &rarr; **Editor properties** 
+# Async scripts
 
 ## Explanation
 This C# Beginner tutorial covers how to expose editor properties for Stride Game Studio. By creating a public variable at the top of our script, we can create editor properties. Some of the most common properties are demonstrated. We can also create public variables that are not shown in the editor.
 
-![Editor properties](media/editor-properties2.png)
-
 <iframe width="560" height="315" src="https://www.youtube.com/embed/GPiWbfsG5F0" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 
-
 ## Code
 [!code-csharp[Entity](..\..\..\..\stride\samples\Tutorials\CSharpBeginner\CSharpBeginner\CSharpBeginner.Game\Code\PropertiesDEmo.cs)]
 

+ 1 - 4
en/tutorials/csharpintermediate/audio.md

@@ -1,11 +1,8 @@
-# Keyboard input
-You can find this sample in the tutorial project: **Menu** &rarr; **Keyboard input** 
+# Audio
 
 ## Explanation
 This C# Beginner tutorial covers how to handle keyboard input. We can check for the existence of a keyboard and then we can use various methods to check if a key is pressed, held down or released.
 
-![Keyboard input](media/keyboard-input.png)
-
 <iframe width="560" height="315" src="https://www.youtube.com/embed/UvKizPFAego" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 
 ## Code

+ 2 - 5
en/tutorials/csharpintermediate/collision-triggers.md

@@ -1,12 +1,10 @@
-# Collision trigger
+# Collision triggers
 
 ## Explanation
 This C# intermediate tutorial covers the use of collision triggers. It teaches about rigid bodies and how to set those up in the editor.
 
 Rigid bodies determine how entites in our scene behave on gravity, whether they collider with other objects or in the case of this tutorial": trigger collision events in our code. We do this by setting up a collider box in our scene and letting a sphere roll through this object. The events that are triggered are then processed by the script that we will make for it.
 
-![Collision triggers](media/collision-triggers.png)
-
 <iframe width="560" height="315" src="https://www.youtube.com/embed/TzwGe4RzAb4" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 
 ## Code
@@ -16,5 +14,4 @@ The code below looks for the rigidbody component that is attached to our entity.
 We spawn a sphere which also has a rigidbody. This sphere has a mass and is affected by gravity. The sphere will fall down and eventually roll through our collider box. In our update loop we check if there are collisions happening. If there are collisions, we get the colliding object and print out some text on screen. Once there sphere leaves the trigger box, our update loop sees that we no longer having collisions.
 
 Instead of a using our update loop, we can also use collision events. 
-[!code-csharp[editorpages](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\02_Collision-Triggers/CollisionTriggerDemo.cs)]
-
+[!code-csharp[collisiontriggerdemo](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\02_Collision-Triggers\CollisionTriggerDemo.cs)]

+ 7 - 6
en/tutorials/csharpintermediate/first-person-camera.md

@@ -1,13 +1,14 @@
-# Instantiating Prefabs
-You can find this sample in the tutorial project: **Menu** &rarr; **Instantiating prefabs** 
+# First person camera
 
 ## Explanation
-This C# Beginner tutorial covers how to instantiate prefabs. A prefab is a "master" version of an object that you can reuse wherever you need. When you change the prefab, every instance of the prefab changes too. A prefab that is instantiated by code does not give you a new prefab object, but instead gives you a list of entities. As long as these entities are not added to the scene, they wont be visible and attached scripts will not be executed. 
-
-![Instantiating Prefabs](media/instantiating-prefabs.png)
+This C# Intermediate tutorial covers
 
 <iframe width="560" height="315" src="https://www.youtube.com/embed/19u2QACzdAk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 
 
 ## Code
-[!code-csharp[Instantiating Prefabs](..\..\..\..\stride\samples\Tutorials\CSharpBeginner\CSharpBeginner\CSharpBeginner.Game\Code\InstantiatingPrefabsDemo.cs)]
+### Camera controller
+[!code-csharp[firstpersoncamera](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\09_FirstPersonCamera\FirstPersonCamera.cs)]
+
+### Character movement
+[!code-csharp[firstpersoncamera](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\10_ThirdPersonCamera\CharacterMovement.cs)]

+ 1 - 4
en/tutorials/csharpintermediate/navigation.md

@@ -1,12 +1,9 @@
 # Navigation
-You can find this sample in the tutorial project: **Menu** &rarr; **Keyboard input** 
 
 ## Explanation
 This C# Beginner tutorial covers how to handle keyboard input. We can check for the existence of a keyboard and then we can use various methods to check if a key is pressed, held down or released.
 
-![Keyboard input](media/keyboard-input.png)
-
 <iframe width="560" height="315" src="https://www.youtube.com/embed/UvKizPFAego" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 
 ## Code
-[!code-csharp[Entity](..\..\..\..\stride\samples\Tutorials\CSharpBeginner\CSharpBeginner\CSharpBeginner.Game\Code\KeyboardInputDemo.cs)]
+[!code-csharp[uibycode](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\11_Navigation\NavigateCharacter.cs)]

+ 2 - 4
en/tutorials/csharpintermediate/project-and-unproject.md

@@ -7,8 +7,6 @@ The 3D to 2D or projecting happens for instance when you have 3d quest marker. W
 
 From 2D to 3D is often used to convert a mouse coordinate in to the looking direction of the camera. This can used for firing a weapon or setting a target on a map when playing a strategy game.
 
-![Linear interpolation](media/lerp.png)
-
 <iframe width="560" height="315" src="https://www.youtube.com/embed/jBXGvLBwXqI" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 
 
@@ -16,8 +14,8 @@ From 2D to 3D is often used to convert a mouse coordinate in to the looking dire
 
 ### Project
 The example consists of a s
-[!code-csharp[project](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\01_UI-Basics\UIByCode)]
+[!code-csharp[project](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\04_Project-UnProject\ProjectDemo.cs)]
 
 ## Unproject
 The example consists of a s
-[!code-csharp[unproject](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\01_UI-Basics\UIByCode)]
+[!code-csharp[unproject](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\04_Project-UnProject\UnprojectDemo.cs)]

+ 2 - 5
en/tutorials/csharpintermediate/raycasting.md

@@ -3,17 +3,14 @@
 ## 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. 
 
-![Add a component](media/raycasting.png)
-
-
 <iframe width="560" height="315" src="https://www.youtube.com/embed/KGuBSRyRmVo" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 
 ## Code
 ### Raycast
 This script send out a raycast from the weapons barrel and sends it to an endpoint a little further. We check if hit something along the way. If we do, we calculate the distance between the weapon barrel and the hit point. We than scale a laser to that distance to visualize the actual raycast. Depending on the collision group and filters, some objects are ignored.
-[!code-csharp[editorpages](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\03_Raycasting\raycastdemo.cs)]
+[!code-csharp[editorpages](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\03_Raycasting\RaycastDemo.cs)]
 
 
 ### Penetrative raycast
 In our first script, the raycast returns to us as soon as it hits the first object along it path. We can also send out a raycast to an endpoint, and let it return to us when it has reach its endpoint. It gives us back a list of objects that it has hit along the way. This list can be empty but also exist out of various objects. Depending on the collision group and filters, some objects are ignored.
-[!code-csharp[editorpages](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\03_Raycasting\pentrativeraycastdemo.cs)]
+[!code-csharp[editorpages](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\03_Raycasting\RaycastPenetratingDemo.cs)]

+ 0 - 3
en/tutorials/csharpintermediate/scenes.md

@@ -3,9 +3,6 @@
 ## Explanation
 This C# Intermediate tutorial covers loading/unloading scenes and child scenes. Levels in Stride are build using 'Scenes'. A scene is hierarchy of the objects or entities in your world. A single scene can contain an infinite amount of child scenes which can be loaded and unloaded at any point. Those child scenes can be loaded with an offset if desired.
 
-![Transform Position](media/scenes.png)
-
-
 <iframe width="560" height="315" src="https://www.youtube.com/embed/2N6NhijZuJk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 
 

+ 7 - 12
en/tutorials/csharpintermediate/third-person-camera.md

@@ -1,18 +1,13 @@
-# Getting a component
-You can find this sample in the tutorial project: **Menu** &rarr;  **Getting a component** 
+# First person camera
 
 ## Explanation
-This C# beginner tutorial covers how to get and remove components. Components are one of the most important concepts in Stride. Every entity in the scene has a list of components. The transform for instance is also a component. When we make custom scripts that inherit from SyncScript or AsyncScript, they turn into Components that we can attach to entities. We can attach these components to entities by using the editor or we can attach them by code.
+This C# Intermediate tutorial covers
 
-![Get a component](media/getting-a-component.png)
-
-<iframe width="560" height="315" src="https://www.youtube.com/embed/qRZG8qXkvDQ" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
+<iframe width="560" height="315" src="https://www.youtube.com/embed/19u2QACzdAk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
 
 ## Code
-### AmmoComponent
-This is the first component that we attach to an entity. In the second script, we will try to get this AmmoComponent.
-[!code-csharp[AmmoComponent](..\..\..\..\stride\samples\Tutorials\CSharpBeginner\CSharpBeginner\CSharpBeginner.Game\Code\AmmoComponent.cs)]
+### Camera controller
+[!code-csharp[firstpersoncamera](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\10_ThirdPersonCamera\ThirdPersonCamera.cs)]
 
-### Getting A Component
-This component script, will retrieve the AmmoComponent script above and use its public method.
-[!code-csharp[GettingAComponent](..\..\..\..\stride\samples\Tutorials\CSharpBeginner\CSharpBeginner\CSharpBeginner.Game\Code\GettingAComponentDemo.cs)]
+### Character movement
+[!code-csharp[firstpersoncamera](..\..\..\..\stride\samples\Tutorials\CSharpIntermediate\CSharpIntermediate\CSharpIntermediate.Game\10_ThirdPersonCamera\CharacterMovement.cs)]

+ 3 - 0
en/tutorials/media/csharp-beginner.jpg

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fab74fa1c5dfef79b59d5d931af7f422ffc22c0421e6ab320d7916de579f0c6c
+size 21849

+ 3 - 0
en/tutorials/media/csharp-intermediate.png

@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fedd21a35cd96bc80ef2394353957beea9f694eb8b2bd5700ecc0b5a06e4c4e7
+size 71698

+ 2 - 2
en/tutorials/media/gamestudio.jpg

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:4aae41174bd81fe41eadb55a522eddc2d4c0a8677953fe56eb910aaa9ce1e7f4
-size 335326
+oid sha256:ea415f1df3a4689657e7408a418301a5641b7ad512c208ba323a5c12fad65aa8
+size 20109

+ 0 - 3
en/tutorials/media/tutorial_advanced.png

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4aef0f50d837664433cf5dbe9112ac1cd78ab1c67475b75d06fd98415febf8ed
-size 25597

+ 0 - 3
en/tutorials/media/tutorial_basics.png

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8da14dd4f4d5e25604de9351fd5d7a163981ac388936c080fa345c678764b49f
-size 25711

+ 0 - 3
en/tutorials/media/tutorial_intermediate.png

@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c049133a26fedf5eb2ce29f67fe46a55f3d4ee3ae6e809cc7f1041a691608c5a
-size 27428