177 lines
6.6 KiB
Plaintext
177 lines
6.6 KiB
Plaintext
# This file is part of the Colobot: Gold Edition source code
|
|
# Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam
|
|
# This file is distributed under the same license as the Colobot package.
|
|
# next_ghost <next_ghost@quick.cz>, 2018.
|
|
msgid ""
|
|
msgstr ""
|
|
"Project-Id-Version: 0.1.11\n"
|
|
"POT-Creation-Date: DATE\n"
|
|
"PO-Revision-Date: 2018-03-07 23:37+01\n"
|
|
"Last-Translator: next_ghost <next_ghost@quick.cz>\n"
|
|
"Language-Team: Czech <next_ghost@quick.cz>\n"
|
|
"Language: Czech\n"
|
|
"MIME-Version: 1.0\n"
|
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
"Content-Transfer-Encoding: 8bit\n"
|
|
"Plural-Forms: nplurals=3; plural=((n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2);\n"
|
|
"X-Language: cs_CZ\n"
|
|
"X-Source-Language: en_US\n"
|
|
|
|
#. type: Title-text
|
|
#: ../scene.txt:1
|
|
#, no-wrap
|
|
msgid "Fighter Jet 2"
|
|
msgstr "Stíhačka 2"
|
|
|
|
#. type: Resume-text
|
|
#: ../scene.txt:2
|
|
#, no-wrap
|
|
msgid "Adapt the program to a mountainous terrain."
|
|
msgstr "Upravte program pro kopcovitý terén."
|
|
|
|
#. type: ScriptName-text
|
|
#: ../scene.txt:3
|
|
#, no-wrap
|
|
msgid "Move"
|
|
msgstr "Stihacka2"
|
|
|
|
#. type: \b; header
|
|
#: ../help/help.E.txt:1
|
|
#, no-wrap
|
|
msgid "Objective"
|
|
msgstr "Úkol"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:2
|
|
#, no-wrap
|
|
msgid "Adapt the flying height of the <a object|botfj>winged shooter</a> to the terrain."
|
|
msgstr "Přizpůsobte letovou výšku <a object|botfj>létajícího kanónu</a> okolnímu terénu."
|
|
|
|
#. type: \t; header
|
|
#: ../help/help.E.txt:4
|
|
#, no-wrap
|
|
msgid "Program"
|
|
msgstr "Program"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:5
|
|
#, no-wrap
|
|
msgid "Here is one more time the program of the previous exercise that hunts ants:"
|
|
msgstr "Zde je opět program na likvidaci mravenců z předchozího cvičení:"
|
|
|
|
#. type: Source code
|
|
#: ../help/help.E.txt:7
|
|
#, no-wrap
|
|
msgid ""
|
|
"extern void object::JetFighter1()\n"
|
|
"{\n"
|
|
"\tobject item;\n"
|
|
"\t\n"
|
|
"\taim(-20);\n"
|
|
"\tjet(0.2);\n"
|
|
"\twhile (position.z < 10)\n"
|
|
"\t{\n"
|
|
"\t\twait(0.2);\n"
|
|
"\t}\n"
|
|
"\tjet(0);\n"
|
|
"\t\n"
|
|
"\twhile (true)\n"
|
|
"\t{\n"
|
|
"\t\twhile (radar(AlienAnt, 0, 360, 0, 20) == null)\n"
|
|
"\t\t{\n"
|
|
"\t\t\titem = radar(AlienAnt);\n"
|
|
"\t\t\tturn(direction(item.position));\n"
|
|
"\t\t\tmotor(1,1);\n"
|
|
"\t\t\twait(0.2);\n"
|
|
"\t\t}\n"
|
|
"\t\tfire(1);\n"
|
|
"\t}\n"
|
|
"}"
|
|
msgstr ""
|
|
"extern void object::Stihacka1()\n"
|
|
"{\n"
|
|
"\tobject item;\n"
|
|
"\t\n"
|
|
"\taim(-20);\n"
|
|
"\tjet(0.2);\n"
|
|
"\twhile (position.z < 10)\n"
|
|
"\t{\n"
|
|
"\t\twait(0.2);\n"
|
|
"\t}\n"
|
|
"\tjet(0);\n"
|
|
"\t\n"
|
|
"\twhile (true)\n"
|
|
"\t{\n"
|
|
"\t\twhile (radar(AlienAnt, 0, 360, 0, 20) == null)\n"
|
|
"\t\t{\n"
|
|
"\t\t\titem = radar(AlienAnt);\n"
|
|
"\t\t\tturn(direction(item.position));\n"
|
|
"\t\t\tmotor(1,1);\n"
|
|
"\t\t\twait(0.2);\n"
|
|
"\t\t}\n"
|
|
"\t\tfire(1);\n"
|
|
"\t}\n"
|
|
"}"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:32
|
|
#, no-wrap
|
|
msgid "The bot always stays at an altitude of 10m above sea level. This is not adapted to the mountainous terrain of the present exercise, the bot has got to adapt to the terrain. The best way to do so is to insert just before the <c/>wait(0.2);<n/> a test to see if the height above ground is too low or too high, and to react accordingly."
|
|
msgstr "Robot celou dobu poletí v nadmořské výšce 10 metrů. Kopcovitý terén v tomto cvičení ale neumožňuje let v této výšce, takže se robot musí terénu přizpůsobit. Nejjednodušší řešení je vložit před příkaz <c/>wait(0.2);<n/> kontrolu, jestli robot neletí příliš nízko nebo vysoko, a podle toho ovládat tryskový motor."
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:34
|
|
#, no-wrap
|
|
msgid "We already saw that <code>position.z</code> gives the altitude above sea level. <code><a cbot|topo>topo</a>(position)</code> gives the altitude of the ground at the position of the bot. If we want the bot to stay at an altitude between 6 and 9m above ground, we must treat the following cases: if <code>position.z-topo(position)</code> is smaller than 6, the bot must climb with <c/>jet(1);<n/>. If <code>position.z-topo(position)</code> is greater than 9, the bot must go down with <c/>jet(-1);<n/>. In order to program these tests, use the instruction <code><a cbot|if>if</a></code>, that executes the instructions in braces only once if the condition is true:"
|
|
msgstr "Už jsme probírali, že <code>position.z</code> udává nadmořskou výšku robota. <code><a cbot|topo>topo</a>(position)</code> udává nadmořskou výšku terénu přímo pod robotem. Pokud chceme, aby robot létal ve výšce 6 až 9 metrů nad zemí, musíme ošetřit následující případy: pokud je <code>position.z-topo(position)</code> menší než 6, robot musí stoupat příkazem <c/>jet(1);<n/>. Pokud je <code>position.z-topo(position)</code> větší než 9, robot musí klesat příkazem <c/>jet(-1);<n/>. Pro naprogramování těchto podmínek použijte příkaz <code><a cbot|if>if</a></code>, který provede příkazy ve složených závorkách pouze jednou, pokud platí daná podmínka:"
|
|
|
|
#. type: Source code
|
|
#: ../help/help.E.txt:36
|
|
#, no-wrap
|
|
msgid ""
|
|
"\tjet(0);\n"
|
|
"\tif (position.z-topo(position) < 6)\n"
|
|
"\t{\n"
|
|
"\t\tjet(1);\n"
|
|
"\t}\n"
|
|
"\t\n"
|
|
"\tif (position.z-topo(position) > 9)\n"
|
|
"\t{\n"
|
|
"\t\tjet(-1);\n"
|
|
"\t}"
|
|
msgstr ""
|
|
"\tjet(0);\n"
|
|
"\tif (position.z-topo(position) < 6)\n"
|
|
"\t{\n"
|
|
"\t\tjet(1);\n"
|
|
"\t}\n"
|
|
"\t\n"
|
|
"\tif (position.z-topo(position) > 9)\n"
|
|
"\t{\n"
|
|
"\t\tjet(-1);\n"
|
|
"\t}"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:47
|
|
#, no-wrap
|
|
msgid "Before starting the testing, stabilize the altitude with <c/>jet(0);<n/>: in case the height above ground lies between 6 and 9m, the bot must neither climb nor go down. If afterwards either <c/>jet(1);<n/> or <c/>jet(-1);<n/> is executed, it will cancel the previous <c/>jet(0);<n/>."
|
|
msgstr "Před oběma podmínkami vyrovnejte výšku příkazem <c/>jet(0);<n/>: pokud je aktuální výška mezi 6 a 9 metry nad zemí, robot nesmí stoupat ani klesat. Když se hned poté provede příkaz <c/>jet(1);<n/> nebo <c/>jet(-1);<n/>, předchozí příkaz <c/>jet(0);<n/> se tím zruší."
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:49
|
|
#, no-wrap
|
|
msgid "Just insert these lines before the <code>wait(0.2)</code>, and the bot will adapt to the terrain. You can then delete the first lines of the program that set the initial altitude at 10m."
|
|
msgstr "Jednoduše vložte výše uvedený kód před příkaz <code>wait(0.2)</code> a robot bude za letu kopírovat terén. Pak můžete smazat cyklus na začátku programu, který robotovi přikazuje vystoupat do výšky 10m."
|
|
|
|
#. type: \t; header
|
|
#: ../help/help.E.txt:51
|
|
#, no-wrap
|
|
msgid "See also"
|
|
msgstr "Užitečné odkazy"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:52
|
|
#, no-wrap
|
|
msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr "<a cbot>Programování</a>, <a cbot|type>datové typy</a> a <a cbot|category>kategorie</a>."
|