ソースを参照

Updated tutorial toc and indexes

Jorn Theunissen 6 年 前
コミット
e691f84f94

+ 1 - 1
Tutorials/Tutorials/Assets/GameSettings.xkgamesettings

@@ -2,7 +2,7 @@
 Id: 66354f1a-ad5a-4504-b892-293a74e9a496
 SerializedVersion: {Xenko: 3.1.0.1}
 Tags: []
-DefaultScene: dbb3b809-4ff0-41da-b125-78a5ea1ec89c:Scenes/Basics/3-TransformPosition
+DefaultScene: 9e1b53ff-dc0c-410a-8972-14f949f83a01:Scenes/Basics/Getting a component
 GraphicsCompositor: 6fbf9e7f-5a64-4144-9f7e-42ab89526670:GraphicsCompositor
 Defaults:
     - !Xenko.Audio.AudioEngineSettings,Xenko.Audio

+ 0 - 0
Tutorials/Tutorials/Assets/Scenes/Basics/GetComponent.xkscene → Tutorials/Tutorials/Assets/Scenes/Basics/Getting a component.xkscene


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

@@ -1,5 +1,5 @@
 # Deltatime
-You can find this sample in the tutorial project: **Scenes** -> **Basics** -> **2-DeltaTime** 
+You can find this sample in the tutorial project: **Scenes** -> **Basics** -> **DeltaTime** 
 
 ## Explanation
 This C# basics tutorial covers the retrieval and usage of delta time. Games updates various times per second. This is called 'Frames Per Second' or shortened to 'FPS'. If we wanted to update a timer value, we would need a value that takes into account what the current amount of frames per second is. That is what delta time is used for. So whether your game runs 30 FPS or 120 FPS: you always want to have the same time scale.

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

@@ -1,5 +1,5 @@
 # Editor properties
-You can find this sample in the tutorial project: **Scenes** -> **Basics** -> **4-Editor properties** 
+You can find this sample in the tutorial project: **Scenes** -> **Basics** -> **Editor properties** 
 
 ## Explanation
 This C# basics tutorial covers how to expose editor properties for Xenko game studio. By delcaring a public variable at the top of our script, we can create editor properties. Some of the most common properties are demonstrated.

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

@@ -1,5 +1,5 @@
 # Getting the entity 
-You can find this sample in the tutorial project: **Scenes** -> **Basics** -> **1-Getting an entity** 
+You can find this sample in the tutorial project: **Scenes** -> **Basics** -> **Getting an entity** 
 
 ## Explanation
 This C# basics tutorial covers how to get the entity object. When a script is attached to an entity in the scene, we can access all properties of that Entity by using the 'Entity' property. We can for instance get the entity's name or we can check if the entity has a parent in the scene.

+ 12 - 5
en/tutorials/csharpbasics/getComponent.md

@@ -1,9 +1,16 @@
-# C# basics - Getting the entity 
-This C# basics tutorial covers the entity object.
+# Getting a component
+You can find this sample in the tutorial project: **Scenes** -> **Basics** -> **Getting a component** 
 
 ## Explanation
-When a script is attached to an entity in the scene, we can access all properties of that Entity by using the 'Entity' property. We can find its name, its parent and its scene.
+This C# basics tutorial covers how to get and remove components. Components are the of the most important concepts in Xenko. 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 in to Components that we can attach to entities. Either using the editor or by code.
+
+![Delta time](media/getting-a-component.png)
 
 ## Code
-You can find this sample in the tutorial project 
-<source>
+### 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\Tutorials\Basics\AmmoComponent.cs)]
+
+### Getting A Component
+This component script, will retrieve the AmmoComponent script above and use its public method.
+[!code-csharp[AmmoComponent](..\..\..\Tutorials\Tutorials\Basics\GettingAComponent.cs)]

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

@@ -7,7 +7,7 @@ You can try out each individual script in by creating a new project and use the
 * [Delta time](deltaTime.md) 
 * [Transform Position](transformPosition.md) 
 * [Editor properties](editorProperties.md) 
-* [Get component](getcomponent.md) 
+* [Getting a component](getComponent.md) 
 * [Instantiating entities](instantiatingentities.md) 
 * [Destroing entities](destroyingentities.md) 
 * [Look at](lookAt.md) 

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

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

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

@@ -1,5 +1,5 @@
 # Transform position
-You can find this sample in the tutorial project: **Scenes** -> **Basics** -> **3-TransformPosition** 
+You can find this sample in the tutorial project: **Scenes** -> **Basics** -> **TransformPosition** 
 
 ## Explanation
 This C# basics tutorial covers the Transform component of an entity. The Transform component is such a commonly used component, that you can quick access it via 'Entity.Transform'. The transform contains all kinds properties and methods for Position, Rotation and Scale. In this example we learn the difference between local and world.

+ 2 - 2
en/tutorials/toc.md

@@ -3,9 +3,9 @@
 ## [C# basics](csharpbasics/index.md)
 ### [Getting the Entity](csharpbasics/entity.md)
 ### [DeltaTime](csharpbasics/deltaTime.md) 
-### [Transform Position](csharpbasics/positionAndRotation.md) 
+### [Transform Position](csharpbasics/transformPosition.md) 
 ### [Editor properties](csharpbasics/editorproperties.md) 
-### [Get component](csharpbasics/getcomponent.md) 
+### [Getting a component](csharpbasics/getcomponent.md) 
 ### [Instianting entities](csharpbasics/instantiatingentities.md) 
 ### [Destroing entities](csharpbasics/destroyingentities.md) 
 ### [Look at](csharpbasics/lookAt.md)