diff --git a/ar-SA/images/car-patrol.gif b/ar-SA/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/ar-SA/images/car-patrol.gif differ diff --git a/ar-SA/meta.yml b/ar-SA/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/ar-SA/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/ar-SA/step_1.md b/ar-SA/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/ar-SA/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/ar-SA/unity-comments.txt b/ar-SA/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/ar-SA/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/ar-SA/unity-translatable.txt b/ar-SA/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/ar-SA/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/cy-GB/images/car-patrol.gif b/cy-GB/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/cy-GB/images/car-patrol.gif differ diff --git a/cy-GB/meta.yml b/cy-GB/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/cy-GB/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/cy-GB/step_1.md b/cy-GB/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/cy-GB/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/cy-GB/unity-comments.txt b/cy-GB/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/cy-GB/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/cy-GB/unity-translatable.txt b/cy-GB/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/cy-GB/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/el-GR/images/car-patrol.gif b/el-GR/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/el-GR/images/car-patrol.gif differ diff --git a/el-GR/meta.yml b/el-GR/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/el-GR/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/el-GR/step_1.md b/el-GR/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/el-GR/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/el-GR/unity-comments.txt b/el-GR/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/el-GR/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/el-GR/unity-translatable.txt b/el-GR/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/el-GR/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/en-US/images/car-patrol.gif b/en-US/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/en-US/images/car-patrol.gif differ diff --git a/en-US/meta.yml b/en-US/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/en-US/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/en-US/step_1.md b/en-US/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/en-US/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/en-US/unity-comments.txt b/en-US/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/en-US/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/en-US/unity-translatable.txt b/en-US/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/en-US/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/es-LA/images/car-patrol.gif b/es-LA/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/es-LA/images/car-patrol.gif differ diff --git a/es-LA/meta.yml b/es-LA/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/es-LA/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/es-LA/step_1.md b/es-LA/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/es-LA/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/es-LA/unity-comments.txt b/es-LA/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/es-LA/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/es-LA/unity-translatable.txt b/es-LA/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/es-LA/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/fr-FR/images/car-patrol.gif b/fr-FR/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/fr-FR/images/car-patrol.gif differ diff --git a/fr-FR/meta.yml b/fr-FR/meta.yml new file mode 100644 index 0000000..f10b950 --- /dev/null +++ b/fr-FR/meta.yml @@ -0,0 +1,10 @@ +title: Comportement conditionnel avec if/else +hero_image: images/banner.png +description: Comportement conditionnel avec if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Comportement conditionnel avec if/else diff --git a/fr-FR/step_1.md b/fr-FR/step_1.md new file mode 100644 index 0000000..6fa8d53 --- /dev/null +++ b/fr-FR/step_1.md @@ -0,0 +1,39 @@ +En C#, tu peux utiliser des instructions if/else pour vérifier des conditions : + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +Tu peux utiliser des opérateurs de comparaison pour comparer des variables, des nombres et des chaînes de caractères : `<` `>` `==`. + +Tu peux annuler des conditions en utilisant `!`, ainsi `!hasItem` est vrai si `hasItem` est faux. + +Tu peux joindre des conditions ensemble en utilisant **Booléen et** `&&` et **Booléen ou** `||`. + +Exemple : + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![Un gif animé d'une voiture en vue Game qui tourne à 180 degrés lorsqu'elle atteint une position minimale ou maximale.](images/car-patrol.gif) \ No newline at end of file diff --git a/fr-FR/unity-comments.txt b/fr-FR/unity-comments.txt new file mode 100644 index 0000000..6a9d790 --- /dev/null +++ b/fr-FR/unity-comments.txt @@ -0,0 +1,7 @@ +code à exécuter si la condition1 est vraie + +code à exécuter si la condition1 est fausse et la condition2 est vraie + +code à exécuter si la condition1 et la condition2 sont fausses + +demi-tour diff --git a/fr-FR/unity-translatable.txt b/fr-FR/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/fr-FR/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/hi-IN/images/car-patrol.gif b/hi-IN/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/hi-IN/images/car-patrol.gif differ diff --git a/hi-IN/meta.yml b/hi-IN/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/hi-IN/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/hi-IN/step_1.md b/hi-IN/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/hi-IN/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/hi-IN/unity-comments.txt b/hi-IN/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/hi-IN/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/hi-IN/unity-translatable.txt b/hi-IN/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/hi-IN/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/hr-HR/images/car-patrol.gif b/hr-HR/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/hr-HR/images/car-patrol.gif differ diff --git a/hr-HR/meta.yml b/hr-HR/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/hr-HR/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/hr-HR/step_1.md b/hr-HR/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/hr-HR/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/hr-HR/unity-comments.txt b/hr-HR/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/hr-HR/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/hr-HR/unity-translatable.txt b/hr-HR/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/hr-HR/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/ja-JP/images/car-patrol.gif b/ja-JP/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/ja-JP/images/car-patrol.gif differ diff --git a/ja-JP/meta.yml b/ja-JP/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/ja-JP/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/ja-JP/step_1.md b/ja-JP/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/ja-JP/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/ja-JP/unity-comments.txt b/ja-JP/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/ja-JP/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/ja-JP/unity-translatable.txt b/ja-JP/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/ja-JP/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/kn-IN/images/car-patrol.gif b/kn-IN/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/kn-IN/images/car-patrol.gif differ diff --git a/kn-IN/meta.yml b/kn-IN/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/kn-IN/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/kn-IN/step_1.md b/kn-IN/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/kn-IN/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/kn-IN/unity-comments.txt b/kn-IN/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/kn-IN/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/kn-IN/unity-translatable.txt b/kn-IN/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/kn-IN/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/mr-IN/images/car-patrol.gif b/mr-IN/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/mr-IN/images/car-patrol.gif differ diff --git a/mr-IN/meta.yml b/mr-IN/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/mr-IN/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/mr-IN/step_1.md b/mr-IN/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/mr-IN/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/mr-IN/unity-comments.txt b/mr-IN/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/mr-IN/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/mr-IN/unity-translatable.txt b/mr-IN/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/mr-IN/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/nl-NL/images/car-patrol.gif b/nl-NL/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/nl-NL/images/car-patrol.gif differ diff --git a/nl-NL/meta.yml b/nl-NL/meta.yml new file mode 100644 index 0000000..4784f46 --- /dev/null +++ b/nl-NL/meta.yml @@ -0,0 +1,10 @@ +title: Voorwaardelijk gedrag met if/else +hero_image: images/banner.png +description: Voorwaardelijk gedrag met if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Voorwaardelijk gedrag met if/else diff --git a/nl-NL/step_1.md b/nl-NL/step_1.md new file mode 100644 index 0000000..52054ed --- /dev/null +++ b/nl-NL/step_1.md @@ -0,0 +1,39 @@ +In C# kun je if/else-statements (als/anders) gebruiken om voorwaarden te controleren: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +Je kunt vergelijkingsoperatoren gebruiken om variabelen, getallen en strings te vergelijken: `<` `>` `==`. + +Je kunt voorwaarden omkeren met `!` dus `!hasItem` is True als `hasItem` False is. + +Je kunt voorwaarden samenvoegen met **Boolean en** `&&` en **Boolean of** `||`. + +Voorbeeld: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![Een gif van een auto in de gameweergave die 180 graden draait wanneer deze een min- OF max-positie bereikt.](images/car-patrol.gif) \ No newline at end of file diff --git a/nl-NL/unity-comments.txt b/nl-NL/unity-comments.txt new file mode 100644 index 0000000..c6054c4 --- /dev/null +++ b/nl-NL/unity-comments.txt @@ -0,0 +1,7 @@ +code die moet worden uitgevoerd als voorwaarde1 waar is + +code die moet worden uitgevoerd als voorwaarde1 onwaar is en voorwaarde2 waar is + +code die moet worden uitgevoerd als voorwaarde1 en voorwaarde2 onwaar zijn + +keer om diff --git a/nl-NL/unity-translatable.txt b/nl-NL/unity-translatable.txt new file mode 100644 index 0000000..39b6f70 --- /dev/null +++ b/nl-NL/unity-translatable.txt @@ -0,0 +1,3 @@ +voorwaarde1 + +voorwaarde2 diff --git a/or-IN/images/car-patrol.gif b/or-IN/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/or-IN/images/car-patrol.gif differ diff --git a/or-IN/meta.yml b/or-IN/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/or-IN/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/or-IN/step_1.md b/or-IN/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/or-IN/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/or-IN/unity-comments.txt b/or-IN/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/or-IN/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/or-IN/unity-translatable.txt b/or-IN/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/or-IN/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/pl-PL/images/car-patrol.gif b/pl-PL/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/pl-PL/images/car-patrol.gif differ diff --git a/pl-PL/meta.yml b/pl-PL/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/pl-PL/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/pl-PL/step_1.md b/pl-PL/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/pl-PL/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/pl-PL/unity-comments.txt b/pl-PL/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/pl-PL/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/pl-PL/unity-translatable.txt b/pl-PL/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/pl-PL/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/pt-BR/images/car-patrol.gif b/pt-BR/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/pt-BR/images/car-patrol.gif differ diff --git a/pt-BR/meta.yml b/pt-BR/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/pt-BR/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/pt-BR/step_1.md b/pt-BR/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/pt-BR/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/pt-BR/unity-comments.txt b/pt-BR/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/pt-BR/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/pt-BR/unity-translatable.txt b/pt-BR/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/pt-BR/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/sw-KE/images/car-patrol.gif b/sw-KE/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/sw-KE/images/car-patrol.gif differ diff --git a/sw-KE/meta.yml b/sw-KE/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/sw-KE/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/sw-KE/step_1.md b/sw-KE/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/sw-KE/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/sw-KE/unity-comments.txt b/sw-KE/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/sw-KE/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/sw-KE/unity-translatable.txt b/sw-KE/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/sw-KE/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/xh-ZA/images/car-patrol.gif b/xh-ZA/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/xh-ZA/images/car-patrol.gif differ diff --git a/xh-ZA/meta.yml b/xh-ZA/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/xh-ZA/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/xh-ZA/step_1.md b/xh-ZA/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/xh-ZA/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/xh-ZA/unity-comments.txt b/xh-ZA/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/xh-ZA/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/xh-ZA/unity-translatable.txt b/xh-ZA/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/xh-ZA/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2 diff --git a/zu-ZA/images/car-patrol.gif b/zu-ZA/images/car-patrol.gif new file mode 100644 index 0000000..3768944 Binary files /dev/null and b/zu-ZA/images/car-patrol.gif differ diff --git a/zu-ZA/meta.yml b/zu-ZA/meta.yml new file mode 100644 index 0000000..0edf561 --- /dev/null +++ b/zu-ZA/meta.yml @@ -0,0 +1,10 @@ +title: Conditional behaviour with if/else +hero_image: images/banner.png +description: Conditional behaviour with if/else +version: 4 +listed: false +copyedit: false +last_tested: "2021-11-22" +steps: + - + title: Conditional behaviour with if/else diff --git a/zu-ZA/step_1.md b/zu-ZA/step_1.md new file mode 100644 index 0000000..11f18db --- /dev/null +++ b/zu-ZA/step_1.md @@ -0,0 +1,39 @@ +In C# you can use if/else statements to check conditions: + +--- code --- +--- +language: cs +--- + +if (condition1) +{ + // code to run if condition1 is True +} +else if (condition2) +{ + // code to run if condition1 is false and condition2 is True +} +else +{ // code to run if condition1 and condition2 are False } + +--- /code --- + +You can use comparison operators to compare variables, numbers and strings: `<` `>` `==`. + +You can negate conditions using `!` so `!hasItem` is True if `hasItem` is False. + +You can join conditions together using **Boolean and** `&&` and **Boolean or** `||`. + +Example: + +--- code --- +--- +language: cs +--- +if(transform.position.x < minPosition || transform.position.x > maxPosition) +{ + transform.Rotate(0, 180, 0); // turn around +} +--- /code --- + +![An animated gif of a car in Game view turning 180 degrees when it reaches a min OR max position.](images/car-patrol.gif) \ No newline at end of file diff --git a/zu-ZA/unity-comments.txt b/zu-ZA/unity-comments.txt new file mode 100644 index 0000000..67c3a87 --- /dev/null +++ b/zu-ZA/unity-comments.txt @@ -0,0 +1,7 @@ +code to run if condition1 is True + +code to run if condition1 is false and condition2 is True + +code to run if condition1 and condition2 are False + +turn around diff --git a/zu-ZA/unity-translatable.txt b/zu-ZA/unity-translatable.txt new file mode 100644 index 0000000..10bbe2e --- /dev/null +++ b/zu-ZA/unity-translatable.txt @@ -0,0 +1,3 @@ +condition1 + +condition2