|
@@ -1,14 +1,233 @@
|
|
|
# C# Basics
|
|
# 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.
|
|
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>
|
|
|
|
|
+
|