Browse Source

C# basics now refer to template source code in /Xenko/Samples/Tutorials/C# basics

Jorn Theunissen 6 years ago
parent
commit
aa4351949a

+ 2 - 2
en/tutorials/csharpbasics/addComponent.md

@@ -9,9 +9,9 @@ This C# basics tutorial covers how to add and remove components. In the previous
 ## 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)]
+[!code-csharp[AmmoComponent](..\..\..\..\xenko\samples\Tutorials\C# Basics\CSharpBasics\CSharpBasics.Game\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)]
+[!code-csharp[AddingAComponent](..\..\..\..\xenko\samples\Tutorials\C# Basics\CSharpBasics\CSharpBasics.Game\Code\AddingAComponent.cs)]

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

@@ -7,4 +7,4 @@ This C# basics tutorial covers how to get an enties children. Since those childr
 ![Child entities](media/child-entities.png)
 
 ## Code
-[!code-csharp[Entity](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\ChildEntities.cs)]
+[!code-csharp[Entity](..\..\..\..\xenko\samples\Tutorials\C# Basics\CSharpBasics\CSharpBasics.Game\Code\ChildEntities.cs)]

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

@@ -7,4 +7,4 @@ This C# basics tutorial covers how to clone an existing entity and how to add th
 ![Cloning entities](media/cloning-entities.png)
 
 ## Code
-[!code-csharp[Entity](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\CloneEntity.cs)]
+[!code-csharp[Entity](..\..\..\..\xenko\samples\Tutorials\C# Basics\CSharpBasics\CSharpBasics.Game\Code\CloneEntity.cs)]

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

@@ -7,4 +7,4 @@ This C# basics tutorial covers the retrieval and usage of delta time. Games upda
 ![Delta time](media/deltatime.png)
 
 ## Code
-[!code-csharp[Entity](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\DeltaTime.cs)]
+[!code-csharp[Entity](..\..\..\..\xenko\samples\Tutorials\C# Basics\CSharpBasics\CSharpBasics.Game\Code\DeltaTime.cs)]

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

@@ -7,4 +7,4 @@ This C# basics tutorial covers how to expose editor properties for Xenko game st
 ![Editor properties](media/editor-properties.png)
 
 ## Code
-[!code-csharp[Entity](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\BasicsProperties.cs)]
+[!code-csharp[Entity](..\..\..\..\xenko\samples\Tutorials\C# Basics\CSharpBasics\CSharpBasics.Game\Code\BasicsProperties.cs)]

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

@@ -7,4 +7,4 @@ This C# basics tutorial covers how to get the entity object. When a script is at
 ![Getting the entity example](media/getting-the-entity.png)
 
 ## Code
-[!code-csharp[Entity](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\GettingTheEntity.cs)]
+[!code-csharp[Entity](..\..\..\..\xenko\samples\Tutorials\C# Basics\CSharpBasics\CSharpBasics.Game\Code\GettingTheEntity.cs)]

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

@@ -9,8 +9,8 @@ This C# basics tutorial covers how to get and remove components. Components are
 ## 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](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\AmmoComponent.cs)]
+[!code-csharp[AmmoComponent](...\..\..\..\xenko\samples\Tutorials\C# Basics\CSharpBasics\CSharpBasics.Game\Code\AmmoComponent.cs)]
 
 ### Getting A Component
 This component script, will retrieve the AmmoComponent script above and use its public method.
-[!code-csharp[GettingAComponent](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\GettingAComponent.cs)]
+[!code-csharp[GettingAComponent](..\..\..\..\xenko\samples\Tutorials\C# Basics\CSharpBasics\CSharpBasics.Game\Code\GettingAComponent.cs)]

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

@@ -7,4 +7,4 @@ This C# basics tutorial covers how to handle keyboard input. We can check for th
 ![Keyboard input](media/keyboard-input.png)
 
 ## Code
-[!code-csharp[Entity](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\KeyboardInput.cs)]
+[!code-csharp[Entity](..\..\..\..\xenko\samples\Tutorials\C# Basics\CSharpBasics\CSharpBasics.Game\Code\KeyboardInput.cs)]

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

@@ -7,4 +7,4 @@ This C# basics tutorial covers how to handle mouse input. We can check for the e
 ![Mouse input](media/mouse-input.png)
 
 ## Code
-[!code-csharp[Entity](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\MouseInput.cs)]
+[!code-csharp[Entity](..\..\..\..\xenko\samples\Tutorials\C# Basics\CSharpBasics\CSharpBasics.Game\Code\MouseInput.cs)]

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

@@ -7,4 +7,4 @@ This C# basics tutorial covers how to get an enties children. Since those childr
 ![Child entities](media/remove-entity.png)
 
 ## Code
-[!code-csharp[Entity](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\RemoveEntity.cs)]
+[!code-csharp[Entity](..\..\..\..\xenko\samples\Tutorials\C# Basics\CSharpBasics\CSharpBasics.Game\Code\RemoveEntity.cs)]

+ 10 - 0
en/tutorials/csharpbasics/removingEntities.md

@@ -0,0 +1,10 @@
+# Removing an entity
+You can find this sample in the tutorial project: **Scenes** ->  **Removing entities** 
+
+## Explanation
+This C# basics tutorial covers how to clone an existing entity and how to add that clone to the scene. A cloned entity is an exact copy which means that the Transformd and all other components are copied to.
+
+![Cloning entities](media/cloning-entities.png)
+
+## Code
+[!code-csharp[Entity](..\..\..\..\xenko\samples\Tutorials\C# Basics\CSharpBasics\CSharpBasics.Game\Code\CloneEntity.cs)]

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

@@ -7,4 +7,4 @@ This C# basics tutorial covers the Transform component of an entity. The Transfo
 ![Transform position](media/transform-position.png)
 
 ## Code
-[!code-csharp[Entity](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\BasicsTransformPosition.cs)]
+[!code-csharp[Entity](..\..\..\..\xenko\samples\Tutorials\C# Basics\CSharpBasics\CSharpBasics.Game\Code\BasicsTransformPosition.cs)]

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

@@ -7,4 +7,4 @@ This C# basics tutorial covers how to virtual buttons. Lets say that you a playe
 ![Virtual buttons](media/virtual-buttons.png)
 
 ## Code
-[!code-csharp[VirtualButtons](..\..\..\Tutorials\C# Basics\CSharpBasics\Code\VirtualButtons.cs)]
+[!code-csharp[VirtualButtons](..\..\..\..\xenko\samples\Tutorials\C# Basics\CSharpBasics\CSharpBasics.Game\Code\VirtualButtons.cs)]

+ 1 - 1
en/tutorials/toc.md

@@ -8,8 +8,8 @@
 ### [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) 
+### [DeltaTime](csharpbasics/deltaTime.md) 
 ### [Keyboard input](csharpbasics/keyboardInput.md) 
 ### [Mouse input](csharpbasics/mouseInput.md) 
 ### [Virtual buttons](csharpbasics/virtualButtons.md)