Browse Source

Added nice little thumbnails for each C# basic tutorial. Updated thumbnails.

1 issue is that clicking an image, opens the image instead of navigating.
Jorn Theunissen 6 years ago
parent
commit
a631935bd7

File diff suppressed because it is too large
+ 319 - 200
en/template/styles/main.css


+ 17 - 0
en/tutorials/csharpbasics/addComponent.md

@@ -0,0 +1,17 @@
+# Adding a component
+You can find this sample in the tutorial project: **Scenes** ->  **Adding a component** 
+
+## Explanation
+This C# basics tutorial covers how to add and remove components. In the previous tutorial we learned how we can retrieve components that are already attached to an entity through the editor. This tutorial shows that we can accomplish the same thing by code. We can add the same component several times to the same entity. We also learn how to remove all of components of the same type again.
+
+![Add a component](media/adding-a-component.png)
+
+## Code
+### AmmoComponent
+This is the AmmoComponent. We will not attach it to the entity in the editor. Instead we will add it ourselves in the AddingAComponent script.
+[!code-csharp[AmmoComponent](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\AmmoComponent.cs)]
+
+### Adding A Component
+This component script, will add the AmmoComponent script to the entity. We then add another component (of the same type) before we remove all components of that type.
+Finally we learn how to automatically create a component, attach it to the entity and get a reference all in 1 line of code. This only works if the entity doesn't have any components of the given attached yet.
+[!code-csharp[AddingAComponent](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\AddingAComponent.cs)]

+ 1 - 1
en/tutorials/csharpbasics/getComponent.md

@@ -13,4 +13,4 @@ This is the first component that we attach to an entity. In the second script, w
 
 ### Getting A Component
 This component script, will retrieve the AmmoComponent script above and use its public method.
-[!code-csharp[AmmoComponent](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\GettingAComponent.cs)]
+[!code-csharp[GettingAComponent](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\GettingAComponent.cs)]

+ 230 - 11
en/tutorials/csharpbasics/index.md

@@ -1,14 +1,233 @@
 # C# Basics
 These tutorials cover the absolute basics of using C# when working with the Xenko game engine. Start here if you are new to Xenko or progamming. Althoug having some coding experience is useful, it is not mandatory to get started with these tutorials.
 
-* [Getting the Entity](entity.md)
-* [Child entities](childentities.md)
-* [Transform position](transformPosition.md) 
-* [Editor properties](editorProperties.md) 
-* [Getting a component](getComponent.md) 
-* [Delta time](deltaTime.md) 
-* [Cloning an entity](cloningEntities.md) 
-* [Removing an entity](removeEntities.md) 
-* [Keyboard input](keyboardInput.md) 
-* [Mouse input](mouseInput.md) 
-* [Virtual buttons](virtualButtons.md)
+<div class='tutorial'>
+    [
+    <div class='tutorial_title'>
+       <h2>Getting the Entity</h2>
+    </div>
+    <div class='tutorial_thumb'>
+        <img src="media/getting-the-entity_thumb.png">   
+    </div>
+    <div class='tutorial_description'>
+        What do you learn?
+        <ul>
+            <li>Retrieve the entity</li> 
+            <li>Retrieve the parent</li> 
+            <li>Print debug text</li> 
+        </ul>
+    </div>
+    ](entity.md) 
+</div>
+
+<div class='tutorial'>
+    [
+    <div class='tutorial_title'>
+       <h2>Child entities</h2>
+    </div>
+    <div class='tutorial_thumb'>
+        <img src="media/child-entities_thumb.png">     
+    </div>
+    <div class='tutorial_description'>
+        What do you learn?
+        <ul>
+            <li>Get a specific child entity</li> 
+            <li>Get children in a list</li> 
+            <li>Get children of children</li> 
+        </ul>
+    </div>
+    ](childentities.md) 
+</div>
+
+<div class='tutorial'>
+    [
+    <div class='tutorial_title'>
+       <h2>The transform</h2>
+    </div>
+    <div class='tutorial_thumb'>
+        <img src="media/transform-position_thumb.png">     
+    </div>
+    <div class='tutorial_description'>
+        What do you learn?
+        <ul>
+            <li>Accessing the Transform component</li> 
+            <li>Get the local postion</li> 
+            <li>Get the world position</li> 
+        </ul>
+    </div>
+    ](transformPosition.md) 
+</div>
+
+
+<div class='tutorial'> 
+    [
+    <div class='tutorial_title'>
+       <h2>Editor properties</h2>
+    </div>
+    <div class='tutorial_thumb'>
+        <img src="media/editor-properties_thumb.png">    
+    </div>
+    <div class='tutorial_description'>
+        What do you learn?
+        <ul>
+            <li>Defining various editor properties</li> 
+            <li>Defining lists</li> 
+            <li>Hiding public properties</li> 
+        </ul>
+    </div>
+    ](editorProperties.md) 
+</div>
+
+<div class='tutorial'>
+    [
+    <div class='tutorial_title'>
+       <h2>Getting a component</h2>
+    </div>
+    <div class='tutorial_thumb'>
+        <img src="media/getting-a-component_thumb.png">     
+    </div>
+    <div class='tutorial_description'>
+        What do you learn?
+        <ul>
+            <li>Get a component</li> 
+            <li>Remove a component</li> 
+            <li>Access methods of other components</li> 
+        </ul>
+    </div>
+    ](getComponent.md) 
+</div>
+
+<div class='tutorial'>
+    [
+    <div class='tutorial_title'>
+       <h2>Adding a component </h2>
+    </div>
+    <div class='tutorial_thumb'>
+        <img src="media/adding-a-component_thumb.png">    
+    </div>
+    <div class='tutorial_description'>
+        What do you learn?
+        <ul>
+            <li>Adding a component by code</li> 
+            <li>Removing all components of 1 type</li> 
+            <li>Create and attach a component if it doesn't exists</li> 
+        </ul>
+    </div>
+    ](addComponent.md) 
+</div>
+
+
+<div class='tutorial'> 
+    [
+    <div class='tutorial_title'>
+       <h2>Delta time</h2>
+    </div>
+    <div class='tutorial_thumb'>
+        <img src="media/deltatime_thumb.png">     
+    </div>
+    <div class='tutorial_description'>
+        What do you learn?
+        <ul>
+            <li>Retrieving delta time</li> 
+            <li>Making a simple timer</li> 
+            <li>Making a simple countdown timer</li> 
+        </ul>
+    </div>
+    ](deltaTime.md) 
+</div>
+
+<div class='tutorial'>
+    [
+    <div class='tutorial_title'>
+       <h2>Cloning an entity</h2>
+    </div>
+    <div class='tutorial_thumb'>
+        <img src="media/cloning-entities_thumb.png">     
+    </div>
+    <div class='tutorial_description'>
+        What do you learn?
+        <ul>
+            <li>Cloning an entity</li> 
+            <li>Adding an entity to the current scene</li> 
+            <li>Adding an entity as a child to a parent entity</li> 
+        </ul>
+    </div>
+    ](cloningEntities.md) 
+</div>
+
+<div class='tutorial'>
+    [
+    <div class='tutorial_title'>
+       <h2>Removing an entity</h2>
+    </div>
+    <div class='tutorial_thumb'>
+        <img src="media/removing-entity_thumb.png">    
+    </div>
+    <div class='tutorial_description'>
+        What do you learn?
+        <ul>
+            <li>Cloning new entities using a timer</li> 
+            <li>Removing entities using a timer</li> 
+            <li>Removing an entity from the scene</li> 
+        </ul>
+    </div>
+    ](removeEntities.md) 
+</div>
+
+<div class='tutorial'> 
+    [
+    <div class='tutorial_title'>
+       <h2>Keyboard input</h2>
+    </div>
+    <div class='tutorial_thumb'>
+        <img src="media/keyboard-input_thumb.png">     
+    </div>
+    <div class='tutorial_description'>
+        What do you learn?
+        <ul>
+            <li>Holding down a key</li> 
+            <li>Clicking a key</li> 
+            <li>Releasing a key</li> 
+        </ul>
+    </div>
+    ](keyboardInput.md) 
+</div>
+
+<div class='tutorial'>
+    [
+    <div class='tutorial_title'>
+       <h2>Mouse input</h2>
+    </div>
+    <div class='tutorial_thumb'>
+        <img src="media/mouse-input_thumb.png">    
+    </div>
+    <div class='tutorial_description'>
+        What do you learn?
+        <ul>
+            <li>Holding down a mousebutton</li> 
+            <li>Clicking or releasing a mousebutton</li> 
+            <li>Using the mouse wheel </li> 
+        </ul>
+    </div>
+    ](mouseInput.md) 
+</div>
+
+<div class='tutorial'>
+    [
+    <div class='tutorial_title'>
+       <h2>Virtual buttons</h2>
+    </div>
+    <div class='tutorial_thumb'>
+        <img src="media/virtual-buttons_thumb.png">    
+    </div>
+    <div class='tutorial_description'>
+        What do you learn?
+        <ul>
+            <li>Defining a virtual key configuration</li> 
+            <li>Binding input to the configuration</li> 
+            <li>Using the virtual buttons</li> 
+        </ul>
+    </div>
+    ](virtualButtons.md) 
+</div>
+

+ 3 - 0
en/tutorials/csharpbasics/media/adding-a-component.png

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

+ 3 - 0
en/tutorials/csharpbasics/media/adding-a-component_thumb.png

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

+ 3 - 0
en/tutorials/csharpbasics/media/child-entities_thumb.png

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

+ 3 - 0
en/tutorials/csharpbasics/media/cloning-entities_thumb.png

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

+ 3 - 0
en/tutorials/csharpbasics/media/deltatime_thumb.png

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

+ 3 - 0
en/tutorials/csharpbasics/media/editor-properties_thumb.png

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

+ 3 - 0
en/tutorials/csharpbasics/media/getting-a-component_thumb.png

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

+ 3 - 0
en/tutorials/csharpbasics/media/getting-the-entity_thumb.png

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

+ 3 - 0
en/tutorials/csharpbasics/media/keyboard-input_thumb.png

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

+ 3 - 0
en/tutorials/csharpbasics/media/mouse-input_thumb.png

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

+ 3 - 0
en/tutorials/csharpbasics/media/removing-entity.png

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

+ 3 - 0
en/tutorials/csharpbasics/media/removing-entity_thumb.png

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

+ 3 - 0
en/tutorials/csharpbasics/media/transform-position_thumb.png

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

+ 3 - 0
en/tutorials/csharpbasics/media/virtual-buttons_thumb.png

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

+ 2 - 1
en/tutorials/toc.md

@@ -3,11 +3,12 @@
 ## [C# basics](csharpbasics/index.md)
 ### [Getting the Entity](csharpbasics/entity.md)
 ### [Child entities](csharpbasics/childentities.md) 
-### [DeltaTime](csharpbasics/deltaTime.md) 
 ### [Transform Position](csharpbasics/transformPosition.md) 
 ### [Editor properties](csharpbasics/editorproperties.md) 
 ### [Getting a component](csharpbasics/getcomponent.md) 
+### [Adding a component](csharpbasics/addcomponent.md) 
 ### [Cloning an entity](csharpbasics/cloningEntities.md) 
+### [DeltaTime](csharpbasics/deltaTime.md) 
 ### [Removing an entity](csharpbasics/removingEntities.md) 
 ### [Keyboard input](csharpbasics/keyboardInput.md) 
 ### [Mouse input](csharpbasics/mouseInput.md) 

Some files were not shown because too many files changed in this diff