Quellcode durchsuchen

Added lerp tutorial to beginners

Jorn Theunisen vor 6 Jahren
Ursprung
Commit
ef965ded88

+ 21 - 2
en/tutorials/csharpbeginner/index.md

@@ -198,8 +198,8 @@ These tutorials cover the beginner principles of using C# when working with the
     </div>
     <div class='tutorial_description'>
         <ul>
-            <li>Holding down a mousebutton</li> 
-            <li>Clicking or releasing a mousebutton</li> 
+            <li>Holding down a mouse button</li> 
+            <li>Clicking or releasing a mouse button</li> 
             
             <li>Using the mouse wheel </li> 
         </ul>
@@ -225,3 +225,22 @@ These tutorials cover the beginner principles of using C# when working with the
     ](virtual-buttons.md) 
 </div>
 
+
+<div class='tutorial'> 
+    [
+    <div class='tutorial_title'>
+       <h2>Linear Interpolation</h2>
+    </div>
+    <div class='xk-documentation-image'>
+        ![Linear Interpolation tutorial](media/linear-interpolation_thumb.png "Linear Interpolation tutorial") 
+    </div>
+    <div class='tutorial_description'>
+        <ul>
+            <li>Calculating 'lerp' value</li> 
+            <li>Lerp between vector 3</li> 
+            <li>Random values</li> 
+        </ul>
+    </div>
+    ](keyboard-input.md) 
+</div>
+

+ 14 - 0
en/tutorials/csharpbeginner/linear-interpolation.md

@@ -0,0 +1,14 @@
+# Linear Interpolation
+You can find this sample in the tutorial project: **Menu** -> **Linear Iterpolation** 
+
+## Explanation
+This C# Beginner tutorial covers how to expose editor properties for Xenko 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)
+
+## Code
+[!code-csharp[Entity](..\..\..\..\xenko\samples\Tutorials\CSharpBeginner\CSharpBeginner\CSharpBeginner.Game\Code\PropertiesDEmo.cs)]
+
+The code above will result in the following properties inside Xenko game studio.
+
+![Editor properties](media/editor-properties.png)

+ 3 - 0
en/tutorials/csharpbeginner/media/lerp.png

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

+ 3 - 0
en/tutorials/csharpbeginner/media/lerp_thumb.png

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

+ 2 - 1
en/tutorials/toc.md

@@ -12,4 +12,5 @@
 ### [Removing an entity](csharpbeginner/removing-entities.md) 
 ### [Keyboard input](csharpbeginner/keyboard-input.md) 
 ### [Mouse input](csharpbeginner/mouse-input.md) 
-### [Virtual buttons](csharpbeginner/virtual-buttons.md)
+### [Virtual buttons](csharpbeginner/virtual-buttons.md)
+### [Linear Interpolation](csharpbeginner/linear-interpolation.md)