Explorar o código

Added tutorial for DeltaTime, Transform position and Editor properties

Jorn Theunissen %!s(int64=6) %!d(string=hai) anos
pai
achega
519f6566a5
Modificáronse 27 ficheiros con 457 adicións e 130 borrados
  1. 1 1
      Tutorials/Tutorials/Assets/GameSettings.xkgamesettings
  2. 10 0
      Tutorials/Tutorials/Assets/Models/Cone.xkpromodel
  3. 0 0
      Tutorials/Tutorials/Assets/Models/Sphere.xkpromodel
  4. 10 0
      Tutorials/Tutorials/Assets/Models/Teapot.xkpromodel
  5. 2 2
      Tutorials/Tutorials/Assets/Scenes/Basics/1-Getting the entity.xkscene
  6. 87 0
      Tutorials/Tutorials/Assets/Scenes/Basics/2-DeltaTime.xkscene
  7. 102 0
      Tutorials/Tutorials/Assets/Scenes/Basics/3-TransformPosition.xkscene
  8. 102 0
      Tutorials/Tutorials/Assets/Scenes/Basics/4-Properties.xkscene
  9. 1 1
      Tutorials/Tutorials/Assets/Scenes/SceneTemplate.xkscene
  10. 0 26
      Tutorials/Tutorials/Basics/BasicsGetComponent.cs
  11. 43 0
      Tutorials/Tutorials/Basics/BasicsProperties.cs
  12. 0 26
      Tutorials/Tutorials/Basics/BasicsTransform.cs
  13. 21 0
      Tutorials/Tutorials/Basics/BasicsTransformPosition.cs
  14. 0 26
      Tutorials/Tutorials/Basics/BasicsTranslateAndRotate.cs
  15. 42 0
      Tutorials/Tutorials/Basics/DeltaTime.cs
  16. 1 1
      en/template/styles/main.css
  17. 6 5
      en/tutorials/csharpbasics/deltaTime.md
  18. 5 4
      en/tutorials/csharpbasics/editorProperties.md
  19. 3 5
      en/tutorials/csharpbasics/index.md
  20. 3 0
      en/tutorials/csharpbasics/media/deltatime.png
  21. 3 0
      en/tutorials/csharpbasics/media/editor-properties.png
  22. 3 0
      en/tutorials/csharpbasics/media/transform-position.png
  23. 0 10
      en/tutorials/csharpbasics/positionAndRotation.md
  24. 0 9
      en/tutorials/csharpbasics/startAndUpdate.md
  25. 0 10
      en/tutorials/csharpbasics/transform.md
  26. 10 0
      en/tutorials/csharpbasics/transformPosition.md
  27. 2 4
      en/tutorials/toc.md

+ 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: 90c8a632-2df9-4335-8f09-24cb13e131b6:Scenes/Basics/1-Getting the entity
+DefaultScene: dbb3b809-4ff0-41da-b125-78a5ea1ec89c:Scenes/Basics/3-TransformPosition
 GraphicsCompositor: 6fbf9e7f-5a64-4144-9f7e-42ab89526670:GraphicsCompositor
 Defaults:
     - !Xenko.Audio.AudioEngineSettings,Xenko.Audio

+ 10 - 0
Tutorials/Tutorials/Assets/Models/Cone.xkpromodel

@@ -0,0 +1,10 @@
+!ProceduralModelAsset
+Id: 120c36db-8a04-4dfd-aa11-85d9b46d5143
+SerializedVersion: {Xenko: 2.0.0.0}
+Tags: []
+Type: !ConeProceduralModel
+    Scale: {X: 1.0, Y: 1.0, Z: 1.0}
+    UvScale: {X: 1.0, Y: 1.0}
+    LocalOffset: {X: 0.0, Y: 0.0, Z: 0.0}
+    MaterialInstance:
+        Material: ca5e832c-0dc0-42e8-bd85-fcb24bfd34f1:Materials/Green

+ 0 - 0
Tutorials/Tutorials/Assets/Materials/Sphere.xkpromodel → Tutorials/Tutorials/Assets/Models/Sphere.xkpromodel


+ 10 - 0
Tutorials/Tutorials/Assets/Models/Teapot.xkpromodel

@@ -0,0 +1,10 @@
+!ProceduralModelAsset
+Id: 9a3a7dbc-7b08-478a-aab2-19afe1d6ce1c
+SerializedVersion: {Xenko: 2.0.0.0}
+Tags: []
+Type: !TeapotProceduralModel
+    Scale: {X: 1.0, Y: 1.0, Z: 1.0}
+    UvScale: {X: 1.0, Y: 1.0}
+    LocalOffset: {X: 0.0, Y: 0.0, Z: 0.0}
+    MaterialInstance:
+        Material: 031b2b43-313b-4d95-abdf-c1936970563c:Materials/Blue

+ 2 - 2
Tutorials/Tutorials/Assets/Scenes/Basics/1-Getting the entity.xkscene

@@ -24,7 +24,7 @@ Hierarchy:
                             e698141714dfaa91e3052a9b400da307: ref!! 4f6a503a-8849-4423-b3ce-666f4994e20c
                     13e15fbfeeaeca3e2053429096c8dd79: !ModelComponent
                         Id: dd5db5ca-8036-4799-a488-fd0c30199fb5
-                        Model: 5178da4c-69ec-4123-a502-ef9925474f3d:Materials/Sphere
+                        Model: 5178da4c-69ec-4123-a502-ef9925474f3d:Models/Sphere
                         Materials: {}
         -   Entity:
                 Id: 7af5dbf3-45c6-4dba-a977-975704ed97f4
@@ -78,7 +78,7 @@ Hierarchy:
                         Children: {}
                     13e15fbfeeaeca3e2053429096c8dd79: !ModelComponent
                         Id: 8368f8bd-a907-43f1-9a73-eeb166c23d8a
-                        Model: 5178da4c-69ec-4123-a502-ef9925474f3d:Materials/Sphere
+                        Model: 5178da4c-69ec-4123-a502-ef9925474f3d:Models/Sphere
                         Materials:
                             0944ccdb2e13484e06b8de9bfe3e665f~0: ca5e832c-0dc0-42e8-bd85-fcb24bfd34f1:Materials/Green
                     32ce3a8e6022e179df7e6e1307fdc8cd: !Tutorials.Basics.GettingTheEntity,Tutorials

+ 87 - 0
Tutorials/Tutorials/Assets/Scenes/Basics/2-DeltaTime.xkscene

@@ -0,0 +1,87 @@
+!SceneAsset
+Id: 137dcdfa-bfc8-4805-92a3-dd48f2b79061
+SerializedVersion: {Xenko: 3.1.0.1}
+Tags: []
+ChildrenIds: []
+Offset: {X: 0.0, Y: 0.0, Z: 0.0}
+Hierarchy:
+    RootParts:
+        - ref!! 52a3b5f6-5537-4513-ab9b-d6c1ff3e0e8f
+        - ref!! f6fcb022-fe3c-4922-9be0-a1bff5b8ce97
+        - ref!! 65e11df5-e800-4f69-b912-ee3d1b735e14
+        - ref!! 08a3a4ce-ccd7-498e-9a02-f43d2849d388
+    Parts:
+        -   Entity:
+                Id: 08a3a4ce-ccd7-498e-9a02-f43d2849d388
+                Name: DeltaTimeDemo
+                Components:
+                    ddcfafd546fd4c1f2e374db8aba2de9a: !TransformComponent
+                        Id: 21cd3e5a-a573-47a5-aede-89ba85265f2a
+                        Position: {X: 0.0, Y: 0.563760936, Z: 0.0}
+                        Rotation: {X: 0.0, Y: 0.0, Z: 0.0, W: 1.0}
+                        Scale: {X: 1.0, Y: 1.0, Z: 1.0}
+                        Children: {}
+                    04959b6cb689b2fd181cccd16da81c27: !ModelComponent
+                        Id: df52e893-bf4d-438f-b32b-435384fbdf07
+                        Model: 120c36db-8a04-4dfd-aa11-85d9b46d5143:Models/Cone
+                        Materials:
+                            f1158e4b83bb5b2ca9e839da74158310~0: 619de649-4998-4996-bd74-085eaffdbbeb:Materials/Yellow
+                    cbed46fc14a1c47c4d4eced695ed170b: !Tutorials.Basics.DeltaTime,Tutorials
+                        Id: 0caffdca-f049-425b-a955-661da41dfa94
+        -   Entity:
+                Id: 52a3b5f6-5537-4513-ab9b-d6c1ff3e0e8f
+                Name: Camera
+                Components:
+                    d5dd94550dc377d8b1703c74aae2cee5: !TransformComponent
+                        Id: 56d83429-5834-4694-84d3-552c1c2c1feb
+                        Position: {X: 0.0, Y: 2.0, Z: -4.0}
+                        Rotation: {X: 5.70548142E-09, Y: 0.9914449, Z: 0.1305262, W: -4.33374332E-08}
+                        Scale: {X: 1.0, Y: 1.0, Z: 1.0}
+                        Children: {}
+                    f1cc2f84c67fbd3cc50a22dd0ef605a5: !CameraComponent
+                        Id: 3be1d9b1-b986-4ca4-a611-554abd680199
+                        Name: null
+                        Projection: Perspective
+                        Slot: c9cb3666-f711-498c-9878-292e79ed7993
+        -   Entity:
+                Id: 65e11df5-e800-4f69-b912-ee3d1b735e14
+                Name: Skybox light
+                Components:
+                    88b62d474d21080cf1a760192a108619: !TransformComponent
+                        Id: 900bc25a-abea-4697-a7d5-3d18a3762e5b
+                        Position: {X: 100.0, Y: 0.0, Z: 0.0}
+                        Rotation: {X: 0.0, Y: 0.0, Z: 0.0, W: 1.0}
+                        Scale: {X: 1.0, Y: 1.0, Z: 1.0}
+                        Children: {}
+                    b6410438b41b6be62428102415f68a4e: !LightComponent
+                        Id: dda06db3-02f3-47c9-adab-7b1af7346ea7
+                        Type: !LightSkybox
+                            Skybox: ae4fd991-6290-4c24-b73b-25d81a1a4837:Materials/Skybox
+                    073131bbebf95a3cbbe2d431328d38b1: !BackgroundComponent
+                        Id: b2a84af6-c339-4bdf-a6b3-baeb008d2cf1
+                        Texture: b7f73672-f9bf-44ae-8a04-0017010b4ca1:Materials/Skybox texture
+        -   Entity:
+                Id: f6fcb022-fe3c-4922-9be0-a1bff5b8ce97
+                Name: Directional light
+                Components:
+                    cf26351dfd6822268d36b77072bcc655: !TransformComponent
+                        Id: 500b5457-61ba-461d-9fa4-9e3125619142
+                        Position: {X: 100.0, Y: 0.0, Z: 0.0}
+                        Rotation: {X: 1.131334E-08, Y: 0.9659258, Z: 0.258819044, W: -4.222196E-08}
+                        Scale: {X: 1.0, Y: 1.0, Z: 1.0}
+                        Children: {}
+                    e3f271d9c2060484c44e8dfef59ed0e3: !LightComponent
+                        Id: 40a014ee-6d2f-4dc8-a0f1-3c10363dbe35
+                        Type: !LightDirectional
+                            Color: !ColorRgbProvider
+                                Value: {R: 1.0, G: 1.0, B: 1.0}
+                            Shadow:
+                                Enabled: true
+                                Filter: !LightShadowMapFilterTypePcf
+                                    FilterSize: Filter5x5
+                                Size: Large
+                                DepthRange: {}
+                                PartitionMode: !LightDirectionalShadowMap.PartitionLogarithmic {}
+                                ComputeTransmittance: false
+                                BiasParameters: {}
+                        Intensity: 20.0

+ 102 - 0
Tutorials/Tutorials/Assets/Scenes/Basics/3-TransformPosition.xkscene

@@ -0,0 +1,102 @@
+!SceneAsset
+Id: dbb3b809-4ff0-41da-b125-78a5ea1ec89c
+SerializedVersion: {Xenko: 3.1.0.1}
+Tags: []
+ChildrenIds: []
+Offset: {X: 0.0, Y: 0.0, Z: 0.0}
+Hierarchy:
+    RootParts:
+        - ref!! 936dcd7d-9577-4505-8855-9d97a7cad385
+        - ref!! 827798f0-ee4a-4945-bd70-b9595c4966d3
+        - ref!! 17f1b80b-a1ad-47e1-be12-05133b20805d
+        - ref!! 899b4b61-b3e9-4b21-9937-4c6c8d1a5779
+    Parts:
+        -   Entity:
+                Id: 17f1b80b-a1ad-47e1-be12-05133b20805d
+                Name: Skybox light
+                Components:
+                    88b62d474d21080cf1a760192a108619: !TransformComponent
+                        Id: 7c2814c3-9910-4e34-b33a-5808a4fbfcb8
+                        Position: {X: 100.0, Y: 0.0, Z: 0.0}
+                        Rotation: {X: 0.0, Y: 0.0, Z: 0.0, W: 1.0}
+                        Scale: {X: 1.0, Y: 1.0, Z: 1.0}
+                        Children: {}
+                    b6410438b41b6be62428102415f68a4e: !LightComponent
+                        Id: d3deb257-90bc-4db7-a384-192268ef3b85
+                        Type: !LightSkybox
+                            Skybox: ae4fd991-6290-4c24-b73b-25d81a1a4837:Materials/Skybox
+                    073131bbebf95a3cbbe2d431328d38b1: !BackgroundComponent
+                        Id: 8b63b3ef-66d4-4de7-a4d9-674dca70aab6
+                        Texture: b7f73672-f9bf-44ae-8a04-0017010b4ca1:Materials/Skybox texture
+        -   Entity:
+                Id: 827798f0-ee4a-4945-bd70-b9595c4966d3
+                Name: Directional light
+                Components:
+                    cf26351dfd6822268d36b77072bcc655: !TransformComponent
+                        Id: dcf78a0a-741d-4386-b458-e597fa169eb3
+                        Position: {X: 100.0, Y: 0.0, Z: 0.0}
+                        Rotation: {X: 1.131334E-08, Y: 0.9659258, Z: 0.258819044, W: -4.222196E-08}
+                        Scale: {X: 1.0, Y: 1.0, Z: 1.0}
+                        Children: {}
+                    e3f271d9c2060484c44e8dfef59ed0e3: !LightComponent
+                        Id: 0725cbc7-b65c-4b0c-a511-ab4ba2de3f51
+                        Type: !LightDirectional
+                            Color: !ColorRgbProvider
+                                Value: {R: 1.0, G: 1.0, B: 1.0}
+                            Shadow:
+                                Enabled: true
+                                Filter: !LightShadowMapFilterTypePcf
+                                    FilterSize: Filter5x5
+                                Size: Large
+                                DepthRange: {}
+                                PartitionMode: !LightDirectionalShadowMap.PartitionLogarithmic {}
+                                ComputeTransmittance: false
+                                BiasParameters: {}
+                        Intensity: 20.0
+        -   Entity:
+                Id: 899b4b61-b3e9-4b21-9937-4c6c8d1a5779
+                Name: Theapot-Parent
+                Components:
+                    f8eee6f467c9263f9fdd120f5463f988: !TransformComponent
+                        Id: ad3a1acb-20ee-4215-8ec4-a05bb16af22f
+                        Position: {X: 0.0, Y: 1.0, Z: 1.0}
+                        Rotation: {X: 0.0, Y: 0.0, Z: 0.0, W: 1.0}
+                        Scale: {X: 1.0, Y: 1.0, Z: 1.0}
+                        Children:
+                            347306e2286b0236dd76410cf8cf7814: ref!! 8bef0465-eb1b-41bd-9e90-6f9e7532ab9d
+                    3633cb40f574236299aec88b18c090d2: !ModelComponent
+                        Id: 48d07060-c7d5-4dfc-af38-27f602b4fb6e
+                        Model: 9a3a7dbc-7b08-478a-aab2-19afe1d6ce1c:Models/Teapot
+                        Materials: {}
+        -   Entity:
+                Id: 936dcd7d-9577-4505-8855-9d97a7cad385
+                Name: Camera
+                Components:
+                    d5dd94550dc377d8b1703c74aae2cee5: !TransformComponent
+                        Id: d7665a2b-67e3-4a33-abfb-1694e0cbd90a
+                        Position: {X: 0.0, Y: 2.0, Z: -4.0}
+                        Rotation: {X: 5.70548142E-09, Y: 0.9914449, Z: 0.1305262, W: -4.33374332E-08}
+                        Scale: {X: 1.0, Y: 1.0, Z: 1.0}
+                        Children: {}
+                    f1cc2f84c67fbd3cc50a22dd0ef605a5: !CameraComponent
+                        Id: 28f413f0-f752-4e54-b7d5-2fd1b55e07fc
+                        Name: null
+                        Projection: Perspective
+                        Slot: c9cb3666-f711-498c-9878-292e79ed7993
+        -   Entity:
+                Id: d4929c88-5785-49b4-b210-d4a67e65eb2f
+                Name: Theapot-Child
+                Components:
+                    f8eee6f467c9263f9fdd120f5463f988: !TransformComponent
+                        Id: 8bef0465-eb1b-41bd-9e90-6f9e7532ab9d
+                        Position: {X: -2.0, Y: 0.0, Z: 2.0}
+                        Rotation: {X: 0.0, Y: 0.0, Z: 0.0, W: 1.0}
+                        Scale: {X: 1.0, Y: 1.0, Z: 1.0}
+                        Children: {}
+                    3633cb40f574236299aec88b18c090d2: !ModelComponent
+                        Id: bb1a8336-df79-4dd5-91e9-097573df3de5
+                        Model: 9a3a7dbc-7b08-478a-aab2-19afe1d6ce1c:Models/Teapot
+                        Materials:
+                            89884ee883567432a2d5454ed2de3164~0: 619de649-4998-4996-bd74-085eaffdbbeb:Materials/Yellow
+                    119c35b4f547fd89594d2b38c6a65360: !Tutorials.Basics.BasicsTransformPosition,Tutorials
+                        Id: 7db9e13c-7b03-4a1a-9a39-f5258fb6a72b

+ 102 - 0
Tutorials/Tutorials/Assets/Scenes/Basics/4-Properties.xkscene

@@ -0,0 +1,102 @@
+!SceneAsset
+Id: 0a019d87-d943-4543-9b51-a4016200dff9
+SerializedVersion: {Xenko: 3.1.0.1}
+Tags: []
+ChildrenIds: []
+Offset: {X: 0.0, Y: 0.0, Z: 0.0}
+Hierarchy:
+    RootParts:
+        - ref!! 557b8f7d-38c7-426d-8ce1-801203b646dc
+        - ref!! 21c3c63d-025d-4321-b037-40ea5a33e3aa
+        - ref!! 8f721a90-8a69-40f7-9165-1a8f6270b88c
+        - ref!! 4c059b4f-75ee-4b2a-ade1-550c457d8778
+    Parts:
+        -   Entity:
+                Id: 21c3c63d-025d-4321-b037-40ea5a33e3aa
+                Name: Directional light
+                Components:
+                    cf26351dfd6822268d36b77072bcc655: !TransformComponent
+                        Id: 3337fd94-9773-4560-8777-e48a67a82925
+                        Position: {X: 100.0, Y: 0.0, Z: 0.0}
+                        Rotation: {X: 1.131334E-08, Y: 0.9659258, Z: 0.258819044, W: -4.222196E-08}
+                        Scale: {X: 1.0, Y: 1.0, Z: 1.0}
+                        Children: {}
+                    e3f271d9c2060484c44e8dfef59ed0e3: !LightComponent
+                        Id: 9ea78e05-5a49-47b7-b73f-4e4bf8e90f63
+                        Type: !LightDirectional
+                            Color: !ColorRgbProvider
+                                Value: {R: 1.0, G: 1.0, B: 1.0}
+                            Shadow:
+                                Enabled: true
+                                Filter: !LightShadowMapFilterTypePcf
+                                    FilterSize: Filter5x5
+                                Size: Large
+                                DepthRange: {}
+                                PartitionMode: !LightDirectionalShadowMap.PartitionLogarithmic {}
+                                ComputeTransmittance: false
+                                BiasParameters: {}
+                        Intensity: 20.0
+        -   Entity:
+                Id: 4c059b4f-75ee-4b2a-ade1-550c457d8778
+                Name: Theapot-Parent
+                Components:
+                    f8eee6f467c9263f9fdd120f5463f988: !TransformComponent
+                        Id: ce773a1c-6587-4ed0-8696-e15712862314
+                        Position: {X: 0.0, Y: 0.0, Z: 0.0}
+                        Rotation: {X: 0.0, Y: 0.0, Z: 0.0, W: 1.0}
+                        Scale: {X: 1.0, Y: 1.0, Z: 1.0}
+                        Children: {}
+                    3633cb40f574236299aec88b18c090d2: !ModelComponent
+                        Id: 2000ee21-442f-4031-a6bb-db244e0b9c13
+                        Model: 9a3a7dbc-7b08-478a-aab2-19afe1d6ce1c:Models/Teapot
+                        Materials: {}
+                    c8e9503a549427f69146c243e118f2d0: !Tutorials.Basics.BasicsProperties,Tutorials
+                        Id: 5e0cdc70-b203-4246-9b97-823eafe43ddb
+                        aBoolean: true
+                        aFloat: 5.6
+                        anInteger: 10
+                        aString: Hello world
+                        aColor: {R: 255, G: 0, B: 0, A: 255}
+                        aVector2: {X: 1.0, Y: 2.0}
+                        aVector3: {X: 1.0, Y: 2.0, Z: 3.0}
+                        aVector4: {X: 1.0, Y: 2.0, Z: 3.0, W: 4.0}
+                        entity: ref!! 21c3c63d-025d-4321-b037-40ea5a33e3aa
+                        stringList:
+                            e682013809525a86d639b94ecd333772: 'How '
+                            5139d0d0b839acde1e5a77e09474a206: Are
+                            8f11ec25088e52035781da4c298965ff: You
+                        entityList:
+                            b34837d03806d2517ca24a0d0e2743e1: ref!! 21c3c63d-025d-4321-b037-40ea5a33e3aa
+                            790bcdf3522fd20ebc41811533aa6fab: ref!! 8f721a90-8a69-40f7-9165-1a8f6270b88c
+        -   Entity:
+                Id: 557b8f7d-38c7-426d-8ce1-801203b646dc
+                Name: Camera
+                Components:
+                    d5dd94550dc377d8b1703c74aae2cee5: !TransformComponent
+                        Id: 36bd614a-ad82-44aa-9485-544d2460d396
+                        Position: {X: 0.0, Y: 2.0, Z: -4.0}
+                        Rotation: {X: 5.70548142E-09, Y: 0.9914449, Z: 0.1305262, W: -4.33374332E-08}
+                        Scale: {X: 1.0, Y: 1.0, Z: 1.0}
+                        Children: {}
+                    f1cc2f84c67fbd3cc50a22dd0ef605a5: !CameraComponent
+                        Id: f6b0b765-51b7-4e5a-a548-e8579bc60a9d
+                        Name: null
+                        Projection: Perspective
+                        Slot: c9cb3666-f711-498c-9878-292e79ed7993
+        -   Entity:
+                Id: 8f721a90-8a69-40f7-9165-1a8f6270b88c
+                Name: Skybox light
+                Components:
+                    88b62d474d21080cf1a760192a108619: !TransformComponent
+                        Id: 58b68b58-89e8-4012-996e-6d17586d0589
+                        Position: {X: 100.0, Y: 0.0, Z: 0.0}
+                        Rotation: {X: 0.0, Y: 0.0, Z: 0.0, W: 1.0}
+                        Scale: {X: 1.0, Y: 1.0, Z: 1.0}
+                        Children: {}
+                    b6410438b41b6be62428102415f68a4e: !LightComponent
+                        Id: f6450f56-8d8e-476d-be82-bc10823dbc46
+                        Type: !LightSkybox
+                            Skybox: ae4fd991-6290-4c24-b73b-25d81a1a4837:Materials/Skybox
+                    073131bbebf95a3cbbe2d431328d38b1: !BackgroundComponent
+                        Id: 20376eb7-18a1-499f-ba9b-16b3ea8c1d96
+                        Texture: b7f73672-f9bf-44ae-8a04-0017010b4ca1:Materials/Skybox texture

+ 1 - 1
Tutorials/Tutorials/Assets/Scenes/SceneTemplate.xkscene

@@ -38,7 +38,7 @@ Hierarchy:
                         Children: {}
                     13e15fbfeeaeca3e2053429096c8dd79: !ModelComponent
                         Id: a701e296-85c6-4e91-a857-73795a16a1a8
-                        Model: 5178da4c-69ec-4123-a502-ef9925474f3d:Materials/Sphere
+                        Model: 5178da4c-69ec-4123-a502-ef9925474f3d:Models/Sphere
                         Materials: {}
         -   Entity:
                 Id: ec2f367a-24d7-48e6-8aa8-0cd45ba7a7f3

+ 0 - 26
Tutorials/Tutorials/Basics/BasicsGetComponent.cs

@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Xenko.Core.Mathematics;
-using Xenko.Input;
-using Xenko.Engine;
-
-namespace Tutorials.Basics
-{
-    public class GetComponent : SyncScript
-    {
-        // Declared public member fields and properties will show in the game studio
-
-        public override void Start()
-        {
-            // Initialization of the script.
-        }
-
-        public override void Update()
-        {
-            // Do stuff every new frame
-        }
-    }
-}

+ 43 - 0
Tutorials/Tutorials/Basics/BasicsProperties.cs

@@ -0,0 +1,43 @@
+using System.Collections.Generic;
+using Xenko.Core.Mathematics;
+using Xenko.Engine;
+
+namespace Tutorials.Basics {
+    /// <summary>
+    /// This script demonstrates the most common properties you can expose to the editor.
+    /// When we add the public keyword to the variables, they show up as properties in the editor.
+    /// Note that in the editor, the properties are alphabetically sorted.
+    /// </summary>
+    public class BasicsProperties : SyncScript {
+        public bool aBoolean = true;
+        public float aFloat = 5.6f;
+        public int anInteger = 10;
+        public string aString = "Hello world";
+        public Color aColor = Color.Red;
+        public Vector2 aVector2 = new Vector2(1,2);
+        public Vector3 aVector3 = new Vector3(1,2,3);
+        public Vector4 aVector4 = new Vector4(1,2,3,4);
+
+        //We can reference other entities to our script by using the Entity class
+        public Entity entity;
+
+        //If we want a list of ojects like strings, integers or even Entities, we have to create the new List right away
+        public List<string> stringList = new List<string>();
+        public List<Entity> entityList = new List<Entity>();
+
+        public override void Update() {
+            DebugText.Print("Integer: " +           anInteger,          new Int2(30, 200));
+            DebugText.Print("Float: " +             aFloat,             new Int2(30, 220));
+            DebugText.Print("Boolean: " +           aBoolean,           new Int2(30, 240));
+            DebugText.Print("String: " +            aString,            new Int2(30, 260));
+            DebugText.Print("Vector2: " +           aVector2,           new Int2(30, 280));
+            DebugText.Print("Vector3: " +           aVector3,           new Int2(30, 300));
+            DebugText.Print("Vector4: " +           aVector4,           new Int2(30, 320));
+            DebugText.Print("Color: " +             aColor,             new Int2(30, 340));
+            DebugText.Print("Entity: " +            entity.Name,        new Int2(30, 360));
+            DebugText.Print("String list count: " + stringList.Count,   new Int2(30, 380));
+            DebugText.Print("Entity list count: " + entityList.Count,   new Int2(30, 400));
+
+        }
+    }
+}

+ 0 - 26
Tutorials/Tutorials/Basics/BasicsTransform.cs

@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Xenko.Core.Mathematics;
-using Xenko.Input;
-using Xenko.Engine;
-
-namespace Tutorials.Basics
-{
-    public class BasicsTransform : SyncScript
-    {
-        // Declared public member fields and properties will show in the game studio
-
-        public override void Start()
-        {
-            // Initialization of the script.
-        }
-
-        public override void Update()
-        {
-            // Do stuff every new frame
-        }
-    }
-}

+ 21 - 0
Tutorials/Tutorials/Basics/BasicsTransformPosition.cs

@@ -0,0 +1,21 @@
+using Xenko.Core.Mathematics;
+using Xenko.Engine;
+
+namespace Tutorials.Basics {
+    /// <summary>
+    /// This script demonstrates how to access the entity's local and world position and displays them on screen. 
+    /// </summary>
+    public class BasicsTransformPosition : SyncScript {
+        public override void Start() {}
+
+        public override void Update() {
+            //We store the local and world position of our entity's tranform in a Vector3 variable
+            Vector3 localPosition = Entity.Transform.Position;
+            Vector3 worldPosition = Entity.Transform.WorldMatrix.TranslationVector;
+
+            //We disaply the entity's name and its local and world position on screen
+            DebugText.Print(Entity.Name + " - local position: " + localPosition, new Int2(100, 200));
+            DebugText.Print(Entity.Name + " - world position: " + worldPosition, new Int2(100, 220));
+        }
+    }
+}

+ 0 - 26
Tutorials/Tutorials/Basics/BasicsTranslateAndRotate.cs

@@ -1,26 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Xenko.Core.Mathematics;
-using Xenko.Input;
-using Xenko.Engine;
-
-namespace Tutorials.Basics
-{
-    public class BasicsTranslateAndRotate : SyncScript
-    {
-        // Declared public member fields and properties will show in the game studio
-
-        public override void Start()
-        {
-            // Initialization of the script.
-        }
-
-        public override void Update()
-        {
-            // Do stuff every new frame
-        }
-    }
-}

+ 42 - 0
Tutorials/Tutorials/Basics/DeltaTime.cs

@@ -0,0 +1,42 @@
+using Xenko.Core.Mathematics;
+using Xenko.Engine;
+
+namespace Tutorials.Basics {
+    /// <summary>
+    /// DeltaTime is used to calculate frame independant values. 
+    /// DeltaTime can also be used for creating Timers.
+    /// </summary>
+    public class DeltaTime : SyncScript {
+        //In this variable we keep track of the total time the game runs
+        float totalTime = 0;
+
+        //We use these variable for creating a simple countdown timer
+        float countDownStartTime = 5.0f;
+        float countDownTime = 0;
+
+        public override void Start() {
+            //We start the countdown timer at the initial countdown time of 5 seconds
+            countDownTime = countDownStartTime;
+        }
+
+        public override void Update() {
+            ///We can access Delta time through the static 'Game' object.
+            var deltaTime = (float)Game.UpdateTime.Elapsed.TotalSeconds;
+
+            //We update the total time
+            totalTime += deltaTime;
+
+            //Since we have a countdown timer, we subtract the delta time from the count down time
+            countDownTime -= deltaTime;
+
+            //If the repeatTimer, reaches 0, we reset the countDownTime back to the count down start time
+            if (countDownTime < 0) {
+                countDownTime = countDownStartTime;
+            }
+
+            //We display the total time and the countdown time on screen
+            DebugText.Print("Total time: " + totalTime, new Int2(30, 200));
+            DebugText.Print("Countdown time: " + countDownTime, new Int2(30, 220));
+        }
+    }
+}

+ 1 - 1
en/template/styles/main.css

@@ -598,7 +598,7 @@ h5{
 }
 .xk-documentation-list li:nth-child(2) .xk-documentation-image img, .xk-documentation-list li:nth-child(3) .xk-documentation-image img{
     max-width: 165px;
-    padding-left: -20px;
+    margin-left: -20px;
 }
 
 @media only screen and (max-width: 768px){

+ 6 - 5
en/tutorials/csharpbasics/deltaTime.md

@@ -1,9 +1,10 @@
-# C# basics - Getting the entity 
-This C# basics tutorial covers the entity object.
+# Deltatime
+You can find this sample in the tutorial project: **Scenes** -> **Basics** -> **2-DeltaTime** 
 
 ## 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 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.
+
+![Delta time](media/deltatime.png)
 
 ## Code
-You can find this sample in the tutorial project 
-<source>
+[!code-csharp[Entity](..\..\..\Tutorials\Tutorials\Basics\DeltaTime.cs)]

+ 5 - 4
en/tutorials/csharpbasics/editorProperties.md

@@ -1,9 +1,10 @@
 # Editor properties
-This C# basics tutorial covers the entity object.
+You can find this sample in the tutorial project: **Scenes** -> **Basics** -> **4-Editor properties** 
 
 ## 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 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.
+
+![Editor properties](media/editor-properties.png)
 
 ## Code
-You can find this sample in the tutorial project 
-<source>
+[!code-csharp[Entity](..\..\..\Tutorials\Tutorials\Basics\BasicsProperties.cs)]

+ 3 - 5
en/tutorials/csharpbasics/index.md

@@ -4,12 +4,10 @@ These tutorials cover intermediate topics. You should be familiar with the Basic
 You can try out each individual script in by creating a new project and use the API tutorials example template. Each script is demonstrated a new scene.
 
 * [Getting the Entity](entity.md)
-* [Getting the Transform](transform.md)
-* [Position and Rotation](positionAndRotation.md) 
-* [StartAndUpdate](startAndUpdate.md) 
-* [Editor properties](editorproperties.md) 
+* [Delta time](deltaTime.md) 
+* [Transform Position](transformPosition.md) 
+* [Editor properties](editorProperties.md) 
 * [Get component](getcomponent.md) 
-* [DeltaTime](deltaTime.md) 
 * [Instantiating entities](instantiatingentities.md) 
 * [Destroing entities](destroyingentities.md) 
 * [Look at](lookAt.md) 

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

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

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

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

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

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

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

@@ -1,10 +0,0 @@
-# C# basics - Transform 
-
-This C# basics tutorial covers the transform component.
-
-## Code
-You can find this sample in the tutorial project 
-<source>
-
-## Explanation
-All entities have a transform component.

+ 0 - 9
en/tutorials/csharpbasics/startAndUpdate.md

@@ -1,9 +0,0 @@
-# C# basics - Getting the entity 
-This C# basics tutorial covers the entity object.
-
-## 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.
-
-## Code
-You can find this sample in the tutorial project 
-<source>

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

@@ -1,10 +0,0 @@
-# C# basics - Transform 
-
-This C# basics tutorial covers the transform component.
-
-## Code
-You can find this sample in the tutorial project 
-<source>
-
-## Explanation
-All entities have a transform component.

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

@@ -0,0 +1,10 @@
+# Transform position
+You can find this sample in the tutorial project: **Scenes** -> **Basics** -> **3-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.
+
+![Transform position](media/transform-position.png)
+
+## Code
+[!code-csharp[Entity](..\..\..\Tutorials\Tutorials\Basics\BasicsTransformPosition.cs)]

+ 2 - 4
en/tutorials/toc.md

@@ -2,12 +2,10 @@
 # [Tutorials](index.md)
 ## [C# basics](csharpbasics/index.md)
 ### [Getting the Entity](csharpbasics/entity.md)
-### [Getting the Transform](csharpbasics/transform.md)
-### [Position and Rotation](csharpbasics/positionAndRotation.md) 
-### [StartAndUpdate](csharpbasics/startAndUpdate.md) 
+### [DeltaTime](csharpbasics/deltaTime.md) 
+### [Transform Position](csharpbasics/positionAndRotation.md) 
 ### [Editor properties](csharpbasics/editorproperties.md) 
 ### [Get component](csharpbasics/getcomponent.md) 
-### [DeltaTime](csharpbasics/deltaTime.md) 
 ### [Instianting entities](csharpbasics/instantiatingentities.md) 
 ### [Destroing entities](csharpbasics/destroyingentities.md) 
 ### [Look at](csharpbasics/lookAt.md)