Translate exercises chapter 2
parent
c115262076
commit
7e2fdbebd6
|
@ -0,0 +1,108 @@
|
|||
# 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-04 17:21+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 "Barrage Fire"
|
||||
msgstr "Rozptýlená palba"
|
||||
|
||||
#. type: Resume-text
|
||||
#: ../scene.txt:2
|
||||
#, no-wrap
|
||||
msgid "Set the power of the different motors in order to achieve a barrage fire."
|
||||
msgstr "Ovládejte motory robota přímo, abyste mohli pokropit palbou širší okolí."
|
||||
|
||||
#. type: ScriptName-text
|
||||
#: ../scene.txt:3
|
||||
#, no-wrap
|
||||
msgid "Move"
|
||||
msgstr "Kropitko"
|
||||
|
||||
#. 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 "As a defense against several giant ants attacking from the north, rotate the bot when shooting in order to perform barrage fire."
|
||||
msgstr "Ze severu se blíží roj obřích mravenců. Otáčejte robotem během palby, abyste je všechny pokropili."
|
||||
|
||||
#. 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 "When you are radio-guiding a bot, you can rotate the cannon during the burst in order to sweep a whole zone. You can also do this when programming the bot, but you have to turn the whole bot with the instruction <code><a cbot|motor>motor</a>( , )</code>. This instruction asks for two numbers: the speed of the left-hand motor, and the speed of the right-hand motor. These numbers must range between -1 and +1.<c/> motor(1,1);<n/> moves the bot forward with maximum speed (both motors at full power).<c/> motor(-1,-1);<n/> moves the bot backward with maximum speed.<c/> motor(1,0.9);<n/> moves the bot forward with a slight turn to the right: the left-hand motor turns a little faster than the right-hand motor. And <c/>motor(1,-1);<n/> will turn the bot clockwise on the spot: the left-hand motor moves forward, the right-hand motor moves backward."
|
||||
msgstr "Když robota ovládáte ručně, můžete během palby otáčet kanónem, abyste pokropili větší oblast. Totéž můžete udělat i v programu, ale v tom případě musíte otáčet celého robota příkazem <code><a cbot|motor>motor</a>( , )</code>. Tento příkaz vyžaduje dvě čísla: rychlost levého motoru a rychlost pravého motoru. Obě čísla musejí být v rozsahu -1 až +1. <c/>motor(1,1);<n/> rozjede robota kupředu plnou rychlostí (oba motory na plný výkon). <c/>motor(-1,-1);<n/> rozjede robota vzad plnou rychlostí. <c/>motor(1,0.9);<n/> rozjede robota vpřed a bude mírně točit doprava: levý motor běží trochu rychleji než pravý. A <c/>motor(1,-1);<n/> bude robota otáčet na místě po směru hodinových ručiček: levý motor běží vpřed, pravý motor vzad."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:7
|
||||
#, no-wrap
|
||||
msgid "After a <a cbot|motor>motor</a> instruction the motors will keep this speed until the next <code>motor</code>, <code><a cbot|move>move</a></code>, <code><a cbot|turn>turn</a></code> or <code><a cbot|goto>goto</a></code> instruction. For example, if you perform a rotation on the spot with <c/>motor(1,-1);<n/> and afterward you shoot with <c/>fire(1);<n/>, the bot will continue to turn during the burst, and will sweep a whole zone."
|
||||
msgstr "Po příkazu <a cbot|motor>motor</a> poběží motory dál danou rychlostí až do dalšího zavolání příkazu <code>motor</code>, <code><a cbot|move>move</a></code>, <code><a cbot|turn>turn</a></code> nebo <code><a cbot|goto>goto</a></code>. Například pokud robota začnete otáčet příkazem <c/>motor(1,-1);<n/>, a pak začnete střílet příkazem <c/>fire(1);<n/>, robot se bude otáčet dál během palby a pokropí celé okolí."
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:10
|
||||
#, no-wrap
|
||||
msgid "rotate clockwise with <c/>motor(1,-1);<n/>"
|
||||
msgstr "začněte otáčet po směru hodinových ručiček příkazem <c/> motor(1,-1);<n/>"
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:11
|
||||
#, no-wrap
|
||||
msgid "a 2 seconds burst with <c/>fire(2);<n/>"
|
||||
msgstr "vystřelte dvousekundovou dávku příkazem <c/>fire(2);<n/>"
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:12
|
||||
#, no-wrap
|
||||
msgid "rotate counter-clockwise with <c/>motor(-1,1);<n/>"
|
||||
msgstr "začněte otáčet proti směru hodinových ručiček příkazem <c/> motor(-1,1);<n/>"
|
||||
|
||||
#. type: Bullet: 'o'
|
||||
#: ../help/help.E.txt:13
|
||||
#, no-wrap
|
||||
msgid "a 2 seconds burst."
|
||||
msgstr "vystřelte další dvousekundovou dávku."
|
||||
|
||||
#. type: \t; header
|
||||
#: ../help/help.E.txt:15
|
||||
#, no-wrap
|
||||
msgid "See also"
|
||||
msgstr "Užitečné odkazy"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:16
|
||||
#, 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>."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:9
|
||||
#, no-wrap
|
||||
msgid "The ants attack from the north. In order to sweep the whole zone north of the bot, first turn 90 degrees left with <c/>turn(90);<n/>, then repeat always with <code><a cbot|while>while</a> (true)</code> the following instructions:"
|
||||
msgstr "Mravenci útočí ze severu. Abyste pokropili celou oblast na sever od robota, nejprve se otočte o 90 stupňů vlevo příkazem <c/>turn(90);<n/> a pak cyklem <code><a cbot|while>while</a> (true)</code> opakujte následující příkazy:"
|
|
@ -0,0 +1,138 @@
|
|||
# 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-04 20:31+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 "Flying tower 1"
|
||||
msgstr "Létající věž 1"
|
||||
|
||||
#. type: Resume-text
|
||||
#: ../scene.txt:2
|
||||
#, no-wrap
|
||||
msgid "Make a flying defense tower out of a winged shooter."
|
||||
msgstr "Udělejte z létajícího kanónu létající obrannou věž."
|
||||
|
||||
#. type: ScriptName-text
|
||||
#: ../scene.txt:3
|
||||
#, no-wrap
|
||||
msgid "Move"
|
||||
msgstr "Obrana1"
|
||||
|
||||
#. 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 "As a defense against ants attacking from all sides, adapt the program <code>Spider2</code> in order to fly at a given altitude."
|
||||
msgstr "Na obranu proti mravencům útočícím ze všech stran upravte program <code>Pavouk2</code>, aby létal v zadané výšce."
|
||||
|
||||
#. 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 "The program necessary for this task is somewhat similar to the program <code>Spider2</code> that looks for the closest ant, turns towards it and fires:"
|
||||
msgstr "Program vhodný pro tento úkol je z části podobný jako <code>Pavouk2</code>, který najde nejbližšího mravence, otočí se k němu a vystřelí:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:7
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"extern void object::Spider2()\n"
|
||||
"{\t\n"
|
||||
"\tobject item;\n"
|
||||
"\t\n"
|
||||
"\twhile (true)\n"
|
||||
"\t{\n"
|
||||
"\t\titem = radar(AlienSpider);\n"
|
||||
"\t\tturn(direction(item.position));\n"
|
||||
"\t\tfire(1);\n"
|
||||
"\t}\n"
|
||||
"}"
|
||||
msgstr ""
|
||||
"extern void object::Pavouk2()\n"
|
||||
"{\t\n"
|
||||
"\tobject item;\n"
|
||||
"\t\n"
|
||||
"\twhile (true)\n"
|
||||
"\t{\n"
|
||||
"\t\titem = radar(AlienSpider);\n"
|
||||
"\t\tturn(direction(item.position));\n"
|
||||
"\t\tfire(1);\n"
|
||||
"\t}\n"
|
||||
"}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:19
|
||||
#, no-wrap
|
||||
msgid "You can copy-paste it to the editor, and adapt it. Replace <c/>radar(AlienSpider);<n/> by <c/>radar(AlienAnt);<n/>, and write before the <code>while</code> loop another loop that activates the jet beneath the <a object|botfj>winged shooter</a> until the bot reaches an altitude of 20 meters."
|
||||
msgstr "Můžete si ho zkopírovat do editoru a upravit ho. Přepište <c/>radar(AlienSpider);<n/> na <c/>radar(AlienAnt);<n/> a před cyklus <code>while</code> přidejte další cyklus, který zapne tryskový motor <a object|botfj>létajícího kanónu</a>, dokud robot nevystoupá do výšky 20 metrů."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:21
|
||||
#, no-wrap
|
||||
msgid "The instruction <code><a cbot|jet>jet</a>()</code> controls the jet beneath winged bots. The number in brackets must range between <code>-1</code> and <code>1</code>.<c/> jet(1);<n/> moves the bot upward with maximum speed.<c/> jet(-1);<n/> moves the bot downward with maximum speed, and <c/>jet(0);<n/> stabilizes the altitude. As the bot must reach a precise altitude, move it upward slowly with <c/>jet(0.2);<n/>, wait until it has reached the desired height, then stabilize the altitude with <c/>jet(0);<n/>."
|
||||
msgstr "Příkaz <code><a cbot|jet>jet</a>()</code> ovládá tryskový motor létajících robotů. Číslo v závorkách musí být v rozsahu <code>-1</code> až <code>+1</code>. <c/>jet(1);<n/> přikazuje robotovi plnou rychlostí stoupat. <c/>jet(-1);<n/> přikazuje robotovi padat volným pádem a <c/>jet(0);<n/> znamená udržovat aktuální výšku. Protože chcete robota poslat do přesné výšky, nechte ho stoupat pomalu příkazem <c/>jet(0.2);<n/>, počkejte na dosažení zadané výšky, a pak zastavte stoupání příkazem <c/>jet(0);<n/>."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:23
|
||||
#, no-wrap
|
||||
msgid "In order to \"wait until it has reached the desired height\", we need a conditional loop: the instructions inside the loop will be repeated only as long as a certain condition is true. The altitude of the bot is given by <code>position.z</code>. We already saw that <code>position</code> gives the position of the bot. And a position is given by the three coordinates x, y and z: the x-axis is the axis west-east, the y-axis is the axis south-north, and the z-axis is the vertical axis. Therefore we must wait while <code>position.z</code> is smaller than 20:"
|
||||
msgstr "Abyste \"počkali na dosažení zadané výšky,\" budete potřebovat podmíněný cyklus: příkazy uvnitř cyklu se budou opakovat pouze dokud platí určitá podmínka. Nadmořskou výšku robota udává výraz <code>position.z</code>. Už jsme probírali, že výraz <code>position</code> udává polohu robota. A poloha se skládá ze tří složek: x, y, z. Osa X leží ve směru západ-východ, osa Y leží ve směru jih-sever a Z je svislá osa. Tedy musíme čekat, dokud <code>position.z</code> je menší než 20:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:25
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"\twhile (position.z < 20)\n"
|
||||
"\t{\n"
|
||||
"\t\twait(0.2);\n"
|
||||
"\t}"
|
||||
msgstr ""
|
||||
"\twhile (position.z < 20)\n"
|
||||
"\t{\n"
|
||||
"\t\twait(0.2);\n"
|
||||
"\t}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:30
|
||||
#, no-wrap
|
||||
msgid "After waiting 0.2 seconds, the program will check if the altitude is still below 20 meters. If this is the case, it will wait a little more, if not, the program continues after the loop, i.e. after the closing brace <code>}</code>. Do not forget after the loop to stabilize the altitude with <c/>jet(0);<n/>."
|
||||
msgstr "Program počká 0,2 sekundy a znovu se podívá, jestli je výška stále menší než 20 metrů. Pokud ano, počká ještě chvíli. Pokud ne, ukončí cyklus, t.j. začne vykonávat příkazy za pravou složenou závorkou: <code>}</code>. Nezapomeňte po skončení cyklu zastavit stoupání příkazem <c/>jet(0);<n/>."
|
||||
|
||||
#. type: \t; header
|
||||
#: ../help/help.E.txt:32
|
||||
#, no-wrap
|
||||
msgid "See also"
|
||||
msgstr "Užitečné odkazy"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:33
|
||||
#, 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>."
|
|
@ -0,0 +1,152 @@
|
|||
# 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-05 23:01+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 "Flying Tower 2"
|
||||
msgstr "Létající věž 2"
|
||||
|
||||
#. type: Resume-text
|
||||
#: ../scene.txt:2
|
||||
#, no-wrap
|
||||
msgid "Program a flying tower that wastes less energy."
|
||||
msgstr "Naprogramujte létající obrannou věž, která nebude tolik plýtvat energií."
|
||||
|
||||
#. type: ScriptName-text
|
||||
#: ../scene.txt:3
|
||||
#, no-wrap
|
||||
msgid "Move"
|
||||
msgstr "Obrana2"
|
||||
|
||||
#. 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 program <code>Tower1</code> in order to avoid wasting energy when shooting at ants that are out of range."
|
||||
msgstr "Upravte program <code>Obrana1</code>, aby zbytečně neplýtval energií palbou na mravence mimo dostřel."
|
||||
|
||||
#. 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 "The program <code>Tower1</code> shoots in the direction of the closest ant, even if it is still out of range:"
|
||||
msgstr "Program <code>Obrana1</code> střílí na nejbližšího mravence, i když je mimo dostřel:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:7
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"extern void object::Tour1()\n"
|
||||
"{\n"
|
||||
"\tobject item;\n"
|
||||
"\t\n"
|
||||
"\tjet(0.2);\n"
|
||||
"\twhile(position.z < 20)\n"
|
||||
"\t{\n"
|
||||
"\t\twait(0.2);\n"
|
||||
"\t}\n"
|
||||
"\tjet(0);\n"
|
||||
"\t\n"
|
||||
"\twhile(true)\n"
|
||||
"\t{\n"
|
||||
"\t\titem = radar(AlienAnt);\n"
|
||||
"\t\tturn(direction(item.position));\n"
|
||||
"\t\tfire(1);\n"
|
||||
"\t}\n"
|
||||
"}"
|
||||
msgstr ""
|
||||
"extern void object::Obrana1()\n"
|
||||
"{\n"
|
||||
"\tobject item;\n"
|
||||
"\t\n"
|
||||
"\tjet(0.2);\n"
|
||||
"\twhile(position.z < 20)\n"
|
||||
"\t{\n"
|
||||
"\t\twait(0.2);\n"
|
||||
"\t}\n"
|
||||
"\tjet(0);\n"
|
||||
"\t\n"
|
||||
"\twhile(true)\n"
|
||||
"\t{\n"
|
||||
"\t\titem = radar(AlienAnt);\n"
|
||||
"\t\tturn(direction(item.position));\n"
|
||||
"\t\tfire(1);\n"
|
||||
"\t}\n"
|
||||
"}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:26
|
||||
#, no-wrap
|
||||
msgid "If the bot must perform the same task than before with only a <a object|power>regular power cell</a>, you can insert a loop that waits until the ant is close enough, i.e. until the ant is at less than 40 meters. Only one burst will be needed for every ant then."
|
||||
msgstr "Tentokrát musí robot splnit stejný úkol pouze s <a object|power>obyčejnou baterií</a>. Musíte tedy přidat cyklus, který bude čekat, až se mravenec dostatečně přiblíží, t.j. dokud nebude blíže než 40 metrů. Pak bude na každého mravence stačit jediná dávka."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:28
|
||||
#, no-wrap
|
||||
msgid "You can give the instruction <code><a cbot|radar()>radar</a></code> more parameters (numbers) indicating where the radar should look for the ants. For example <c/>radar(AlienAnt,0,360,0,40);<n/> will only look for ants that are closer than 40 meters. The two first numbers tell the radar to search in all directions, the two last numbers tell the radar to detect only ants that are at a distance between 0 and 40 meters. If no ant is found that is closer than 40 meters, the instruction <code><a cbot|radar()>radar</a></code> returns the value <code>null</code>. We can then write a conditional loop similar to the one written in the last exercise that waits as long as there is no ant closer than 40 meters:"
|
||||
msgstr "Příkazu <code><a cbot|radar>radar</a>()</code> můžete zadat více parametrů (čísel) vymezujících, kde má radar hledat mravence. Například <c/>radar(AlienAnt,0,360,0,40);<n/> bude hledat mravence pouze do vzdálenosti 40 metrů. První dvě čísla říkají radaru, aby hledal ve všech směrech, další dvě čísla říkají, aby hledal pouze mravence ve vzdálenosti od 0 do 40 metrů. Pokud žádný mravenec není blíže než 40 metrů, příkaz <code><a cbot|radar>radar</a>()</code> vrátí hodnotu <code>null</code>. Můžeme tedy podobně jako v předchozím cvičení napsat cyklus, který bude čekat, dokud se některý mravenec nepřiblíží na méně než 40 metrů:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:30
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"\t\twhile (radar(AlienAnt, 0, 360, 0, 40) == null)\n"
|
||||
"\t\t{\n"
|
||||
"\t\t\twait(0.2);\n"
|
||||
"\t\t}"
|
||||
msgstr ""
|
||||
"\t\twhile (radar(AlienAnt, 0, 360, 0, 40) == null)\n"
|
||||
"\t\t{\n"
|
||||
"\t\t\twait(0.2);\n"
|
||||
"\t\t}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:35
|
||||
#, no-wrap
|
||||
msgid "Notice that two equal signs \"==\" are needed to perform a comparison of equality."
|
||||
msgstr "Všimněte si, že porovnání na rovnost se zapisuje dvěma rovnítky za sebou: \"==\""
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:37
|
||||
#, no-wrap
|
||||
msgid "Just insert these lines before the instruction <c/>fire(0);<n/>, and the bot will wait before shooting until the ant is closer than 40 meters. Like this a regular power cell is enough to kill all ants. "
|
||||
msgstr "Jednoduše vložte výše uvedený kód před příkaz <c/>fire(1);<n/> a robot bude před výstřelem čekat, až se mravenec přiblíží na méně než 40 metrů. Pak bude na likvidaci mravenců stačit i obyčejná baterie. "
|
||||
|
||||
#. type: \t; header
|
||||
#: ../help/help.E.txt:39
|
||||
#, no-wrap
|
||||
msgid "See also"
|
||||
msgstr "Užitečné odkazy"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:40
|
||||
#, 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>."
|
|
@ -0,0 +1,78 @@
|
|||
# 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-06 23:09+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 1"
|
||||
msgstr "Stíhačka 1"
|
||||
|
||||
#. type: Resume-text
|
||||
#: ../scene.txt:2
|
||||
#, no-wrap
|
||||
msgid "Instruct a winged shooter to clean the whole region."
|
||||
msgstr "Naprogramujte létající kanón, aby vyčistil celou oblast."
|
||||
|
||||
#. type: ScriptName-text
|
||||
#: ../scene.txt:3
|
||||
#, no-wrap
|
||||
msgid "Move"
|
||||
msgstr "Stihacka1"
|
||||
|
||||
#. type: \b; header
|
||||
#: ../help/help.E.txt:1
|
||||
#, no-wrap
|
||||
msgid "Objectif"
|
||||
msgstr "Úkol"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:2
|
||||
#, no-wrap
|
||||
msgid "Program a <a object|botfj>winged shooter</a> to hunt all ants in the region."
|
||||
msgstr "Naprogramujte <a object|botfj>létající kanón</a>, aby našel a zlikvidoval všechny mravence v okolí."
|
||||
|
||||
#. 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 "In this swamp, a wheeled or tracked shooter is of little use. And ants, in opposition to spiders, keep moving: you can not just turn towards the closest ant, move forward and shoot."
|
||||
msgstr "V této bažině jsou pojízdné nebo pásové kanóny k ničemu. A mravenci se narozdíl od pavouků neustále pohybují. Nestačí jen otočit se směrem k nejbližšímu mravenci, popojet vpřed a vystřelit."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:7
|
||||
#, no-wrap
|
||||
msgid "The easiest way to solve the problem consists in flying at a height of 10 meters, aiming downward with <c/>aim(-20);<n/>, and approaching the ant with a conditional loop as long as the <a cbot|dist>distance</a> is greater than 20m. In this conditional loop, you must look for the closest ant, turn towards it, set the motors at full speed with <c/>motor(1,1);<n/>, and wait a little, for example 0.2 seconds. All these instructions must be repeated until the ant is at less than 20 meters. Then just shoot it."
|
||||
msgstr "Nejjednodušší řešení je letět ve výšce 10 metrů, namířit dolů příkazem <c/>aim(-20);<n/> a přiblížit se k nejbližšímu mravenci podmíněným cyklem až na <a cbot|dist>vzdálenost</a> 20 metrů. V tomto podmíněném cyklu musíte najít nejbližšího mravence, otočit se k němu, spustit motory naplno příkazem <c/>motor(1,1);<n/> a chviličku počkat, například 0,2 sekundy. Tyto příkazy je třeba opakovat, dokud je mravenec dále než 20 metrů. Pak stačí jen vystřelit."
|
||||
|
||||
#. type: \t; header
|
||||
#: ../help/help.E.txt:9
|
||||
#, no-wrap
|
||||
msgid "See also"
|
||||
msgstr "Užitečné odkazy"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:10
|
||||
#, 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>."
|
|
@ -0,0 +1,176 @@
|
|||
# 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>."
|
|
@ -0,0 +1,148 @@
|
|||
# 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-09 22:58+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 "Wasp Hunter 1"
|
||||
msgstr "Lovec vos 1"
|
||||
|
||||
#. type: Resume-text, Plain text
|
||||
#: ../scene.txt:2 ../help/help.E.txt:2
|
||||
#, no-wrap
|
||||
msgid "Shoot down the flying wasps."
|
||||
msgstr "Sestřelte létající vosy."
|
||||
|
||||
#. type: ScriptName-text
|
||||
#: ../scene.txt:3
|
||||
#, no-wrap
|
||||
msgid "Wasp1"
|
||||
msgstr "Vosa1"
|
||||
|
||||
#. type: \b; header
|
||||
#: ../help/help.E.txt:1
|
||||
#, no-wrap
|
||||
msgid "Objective"
|
||||
msgstr "Úkol"
|
||||
|
||||
#. 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 again the program of the previous exercise that shoots all ants and adapts to the terrain:"
|
||||
msgstr "Zde je opět program z předchozího cvičení, který zlikviduje všechny mravence a za letu kopíruje terén:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:7
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"extern void object::JetFighter2()\n"
|
||||
"{\n"
|
||||
"\t<a cbot|type>object</a> item;\n"
|
||||
"\t\n"
|
||||
"\t<a cbot|aim>aim</a>(-20);\n"
|
||||
"\t\n"
|
||||
"\t<a cbot|while>while</a> (true)\n"
|
||||
"\t{\n"
|
||||
"\t\t<a cbot|while>while</a> (<a cbot|radar>radar</a>(AlienAnt, 0, 360, 0, 20) == null)\n"
|
||||
"\t\t{\n"
|
||||
"\t\t\titem = <a cbot|radar>radar</a>(AlienAnt);\n"
|
||||
"\t\t\t<a cbot|turn>turn</a>(<a cbot|direct>direction</a>(item.position));\n"
|
||||
"\t\t\t<a cbot|motor>motor</a>(1,1);\n"
|
||||
"\t\t\t\n"
|
||||
"\t\t\t<a cbot|jet>jet</a>(0);\n"
|
||||
"\t\t\t<a cbot|if>if</a> (position.z-topo(position) < 6)\n"
|
||||
"\t\t\t{\n"
|
||||
"\t\t\t\t<a cbot|jet>jet</a>(1);\n"
|
||||
"\t\t\t}\n"
|
||||
"\t\t\t\n"
|
||||
"\t\t\t<a cbot|if>if</a> (position.z-topo(position) > 9)\n"
|
||||
"\t\t\t{\n"
|
||||
"\t\t\t\t<a cbot|jet>jet</a>(-1);\n"
|
||||
"\t\t\t}\n"
|
||||
"\t\t\t<a cbot|wait>wait</a>(0.2);\n"
|
||||
"\t\t}\n"
|
||||
"\t\t<a cbot|fire>fire</a>(1);\n"
|
||||
"\t}\n"
|
||||
"}"
|
||||
msgstr ""
|
||||
"extern void object::Stihacka2()\n"
|
||||
"{\n"
|
||||
"\t<a cbot|type>object</a> item;\n"
|
||||
"\t\n"
|
||||
"\t<a cbot|aim>aim</a>(-20);\n"
|
||||
"\t\n"
|
||||
"\t<a cbot|while>while</a> (true)\n"
|
||||
"\t{\n"
|
||||
"\t\t<a cbot|while>while</a> (<a cbot|radar>radar</a>(AlienAnt, 0, 360, 0, 20) == null)\n"
|
||||
"\t\t{\n"
|
||||
"\t\t\titem = <a cbot|radar>radar</a>(AlienAnt);\n"
|
||||
"\t\t\t<a cbot|turn>turn</a>(<a cbot|direct>direction</a>(item.position));\n"
|
||||
"\t\t\t<a cbot|motor>motor</a>(1,1);\n"
|
||||
"\t\t\t\n"
|
||||
"\t\t\t<a cbot|jet>jet</a>(0);\n"
|
||||
"\t\t\t<a cbot|if>if</a> (position.z-topo(position) < 6)\n"
|
||||
"\t\t\t{\n"
|
||||
"\t\t\t\t<a cbot|jet>jet</a>(1);\n"
|
||||
"\t\t\t}\n"
|
||||
"\t\t\t\n"
|
||||
"\t\t\t<a cbot|if>if</a> (position.z-topo(position) > 9)\n"
|
||||
"\t\t\t{\n"
|
||||
"\t\t\t\t<a cbot|jet>jet</a>(-1);\n"
|
||||
"\t\t\t}\n"
|
||||
"\t\t\t<a cbot|wait>wait</a>(0.2);\n"
|
||||
"\t\t}\n"
|
||||
"\t\t<a cbot|fire>fire</a>(1);\n"
|
||||
"\t}\n"
|
||||
"}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:37
|
||||
#, no-wrap
|
||||
msgid "In order to adapt the program to shooting wasps, you need to make a few changes. Replace all <code>radar(AlienAnt)</code> with <code>radar(AlienWasp)</code>. The cannon must aim straight forward and not downward, replace <c/>aim(-20);<n/> with <c/>aim(0);<n/>. And the bot must fly at the same height as the wasp. For this, you must compare the altitude of the bot given by <code>position.z</code> with the altitude of the wasp given by <code>item.position.z</code>: if <code>position.z > item.position.z</code>, go down slowly with <c/>jet(-0.3);<n/>. If <code>position.z < item.position.z-1</code>, climb slowly with <c/>jet(0.3);<n/>. A winged shooter is higher than a wasp, therefore it is better if the altitude of the bot is a little lower than the altitude of the wasp. In this case, we admit that the altitude of the bot ranges between the altitude of the wasp and the altitude of the wasp minus 1."
|
||||
msgstr "Aby tento program fungoval proti vosám, je třeba několik úprav. Změňte všechny příkazy <code>radar(AlienAnt)</code> na <code>radar(AlienWasp)</code>. Kanón musí mířit rovně před sebe místo dolů, takže změňte <c/>aim(-20);<n/> na <c/>aim(0);<n/>. A robot musí letět ve stejné výšce jako vosa. Musíte tedy porovnávat letovou výšku robota danou výrazem <code>position.z</code> s letovou výškou vosy danou výrazem <code>item.position.z</code>: Když bude <code>position.z > item.position.z</code>, pomalu klesejte příkazem <c/>jet(-0.3);<n/>. Když bude <code>position.z < item.position.z-1</code>, pomalu stoupejte příkazem <c/>jet(0.3);<n/>. Létající kanón je vyšší než vosa, takže je výhodnější letět trochu níže. V tomto případě přiznáváme, že robot se bude snažit letět nejvýše ve stejné výšce jako vosa a nejníže metr pod ní."
|
||||
|
||||
#. type: \t; header
|
||||
#: ../help/help.E.txt:39
|
||||
#, no-wrap
|
||||
msgid "Further improvement"
|
||||
msgstr "Další vylepšení"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:40
|
||||
#, no-wrap
|
||||
msgid "Wasps move very fast. In order to increase your chances to get them, better to repeat just before the <c/>fire(1);<n/> a <code>radar</code> and a <code>turn</code> in order to perform a last readjustment of the direction before the shot."
|
||||
msgstr "Vosy se pohybují velmi rychle. Pro lepší šanci na zásah byste tedy před palbou příkazem <c/>fire(1);<n/> měli ještě naposledy upravit směr pomocí příkazů <code>radar</code> a <code>turn</code>."
|
||||
|
||||
#. type: \t; header
|
||||
#: ../help/help.E.txt:42
|
||||
#, no-wrap
|
||||
msgid "See also"
|
||||
msgstr "Užitečné odkazy"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:43
|
||||
#, 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>."
|
|
@ -0,0 +1,258 @@
|
|||
# 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-10 19:04+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 "Wasp Hunter 2"
|
||||
msgstr "Lovec vos 2"
|
||||
|
||||
#. type: Resume-text
|
||||
#: ../scene.txt:2
|
||||
#, no-wrap
|
||||
msgid "Get better at shooting down the wasps."
|
||||
msgstr "Naučte se lépe střílet na vosy."
|
||||
|
||||
#. type: ScriptName-text
|
||||
#: ../scene.txt:3
|
||||
#, no-wrap
|
||||
msgid "Wasp2"
|
||||
msgstr "Vosa2"
|
||||
|
||||
#. 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 "Bring down the flying wasps in a more efficient way than with the previous program."
|
||||
msgstr "Napište efektivnější program na likvidaci létajících vos než byl ten předchozí."
|
||||
|
||||
#. type: \b; 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 again the program of the previous exercise that shoots down all the wasps after many, many unsuccessful attempts:"
|
||||
msgstr "Zde je opět program z předchozího cvičení, který po spoustě neúspěšných pokusů nakonec sestřelí všechny vosy:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:7
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"extern void object::Wasp1()\n"
|
||||
"{\n"
|
||||
"\t<a cbot|type>object</a> item;\n"
|
||||
"\t\n"
|
||||
"\t<a cbot|aim>aim</a>(0);\n"
|
||||
"\t\n"
|
||||
"\t<a cbot|while>while</a> (true)\n"
|
||||
"\t{\n"
|
||||
"\t\t<a cbot|while>while</a> (<a cbot|radar>radar</a>(AlienWasp, 0, 360, 0, 20) == null)\n"
|
||||
"\t\t{\n"
|
||||
"\t\t\titem = <a cbot|radar>radar</a>(AlienWasp);\n"
|
||||
"\t\t\t<a cbot|turn>turn</a>(<a cbot|direct>direction</a>(item.position));\n"
|
||||
"\t\t\t<a cbot|motor>motor</a>(1,1);\n"
|
||||
"\t\t\t\n"
|
||||
"\t\t\t<a cbot|jet>jet</a>(0);\n"
|
||||
"\t\t\t<a cbot|if>if</a> (position.z > item.position.z)\n"
|
||||
"\t\t\t{\n"
|
||||
"\t\t\t\t<a cbot|jet>jet</a>(-0.3);\n"
|
||||
"\t\t\t}\n"
|
||||
"\t\t\t\n"
|
||||
"\t\t\t<a cbot|if>if</a> (position.z < item.position.z - 1)\n"
|
||||
"\t\t\t{\n"
|
||||
"\t\t\t\t<a cbot|jet>jet</a>(0.3);\n"
|
||||
"\t\t\t}\n"
|
||||
"\t\t\t\n"
|
||||
"\t\t\t<a cbot|wait>wait</a>(0.2);\n"
|
||||
"\t\t}\n"
|
||||
"\t\titem = <a cbot|radar>radar</a>(AlienWasp);\n"
|
||||
"\t\t<a cbot|turn>turn</a>(<a cbot|direct>direction</a>(item.position));\n"
|
||||
"\t\t<a cbot|fire>fire</a>(1);\n"
|
||||
"\t}\n"
|
||||
"}"
|
||||
msgstr ""
|
||||
"extern void object::Vosa1()\n"
|
||||
"{\n"
|
||||
"\t<a cbot|type>object</a> item;\n"
|
||||
"\t\n"
|
||||
"\t<a cbot|aim>aim</a>(0);\n"
|
||||
"\t\n"
|
||||
"\t<a cbot|while>while</a> (true)\n"
|
||||
"\t{\n"
|
||||
"\t\t<a cbot|while>while</a> (<a cbot|radar>radar</a>(AlienWasp, 0, 360, 0, 20) == null)\n"
|
||||
"\t\t{\n"
|
||||
"\t\t\titem = <a cbot|radar>radar</a>(AlienWasp);\n"
|
||||
"\t\t\t<a cbot|turn>turn</a>(<a cbot|direct>direction</a>(item.position));\n"
|
||||
"\t\t\t<a cbot|motor>motor</a>(1,1);\n"
|
||||
"\t\t\t\n"
|
||||
"\t\t\t<a cbot|jet>jet</a>(0);\n"
|
||||
"\t\t\t<a cbot|if>if</a> (position.z > item.position.z)\n"
|
||||
"\t\t\t{\n"
|
||||
"\t\t\t\t<a cbot|jet>jet</a>(-0.3);\n"
|
||||
"\t\t\t}\n"
|
||||
"\t\t\t\n"
|
||||
"\t\t\t<a cbot|if>if</a> (position.z < item.position.z - 1)\n"
|
||||
"\t\t\t{\n"
|
||||
"\t\t\t\t<a cbot|jet>jet</a>(0.3);\n"
|
||||
"\t\t\t}\n"
|
||||
"\t\t\t\n"
|
||||
"\t\t\t<a cbot|wait>wait</a>(0.2);\n"
|
||||
"\t\t}\n"
|
||||
"\t\titem = <a cbot|radar>radar</a>(AlienWasp);\n"
|
||||
"\t\t<a cbot|turn>turn</a>(<a cbot|direct>direction</a>(item.position));\n"
|
||||
"\t\t<a cbot|fire>fire</a>(1);\n"
|
||||
"\t}\n"
|
||||
"}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:40
|
||||
#, no-wrap
|
||||
msgid "The many failures are due to the fact that the wasp is already gone before the bullets can reach it. The only way to improve the program consists in setting the power of the two motors and of the jet in such a way that the bot follows the movement of the target during the burst."
|
||||
msgstr "Robot se často nedokáže trefit, protože vosa stihne uletět pryč, než ji střela zasáhne. Tomu lze zabránit jedině tak, že budete přímo ovládat výkon všech motorů, aby robot během palby stále držel cíl na mušce."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:42
|
||||
#, no-wrap
|
||||
msgid "Just before the shot, the program adjusts a last time the direction with <c/>turn(direction(item.position));<n/>. In order to follow the wasp during the burst, you have to \"remember\" the angle of this last rotation: if the angle was positive (rotation to the left), the bot must continue to turn left during the burst; if the angle was negative, the bot must continue to turn right."
|
||||
msgstr "Robot těsně před výstřelem ještě naposledy upraví směr příkazem <c/>turn(direction(item.position));<n/>. Abyste mohli během palby držet vosu na mušce, musíte si tento úhel \"zapamatovat\": pokud byl úhel kladný (otočení doleva), robot musí během palby dále točit doleva, pokud byl záporný, robot musí dále točit doprava."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:44
|
||||
#, no-wrap
|
||||
msgid "In order to \"remember\" the angle of the last rotation, we need a variable that can contain just one number. If we choose to call it <code>angle</code>, we must define the variable with the following line at the beginning of the program:"
|
||||
msgstr "Na \"zapamatování\" daného úhlu potřebujeme proměnnou, do které lze uložit jedno číslo. Když ji nazveme <code>angle</code>, musíme ji na začátku programu deklarovat následujícím řádkem kódu:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:46
|
||||
#, no-wrap
|
||||
msgid "\t<a cbot|type>float</a> angle;"
|
||||
msgstr "\t<a cbot|type>float</a> angle;"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:48
|
||||
#, no-wrap
|
||||
msgid "The variable type <a cbot|type>float</a> is the variable type that can contain any number, i.e. whole numbers or real numbers. Please refer to the <a cbot|type>text about variable types</a> if you want to know more about the different types of variables and what they can contain."
|
||||
msgstr "Proměnná typu <a cbot|type>float</a> může obsahovat libovolné číslo, t.j. celá čísla nebo reálná čísla. Pokud se chcete dozvědět více o různých typech proměnných a co mohou obsahovat, přečtěte si <a cbot|type>popis datových typů</a>."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:50
|
||||
#, no-wrap
|
||||
msgid "Just before the instruction <c/>fire(1);<n/>, instead of writing <c/><a cbot|turn>turn</a>(<a cbot|direct>direction</a>(item.position));<n/>, we will put the rotation angle into the variable <code>angle</code>:"
|
||||
msgstr "Těsně před příkazem <c/>fire(1);<n/> místo příkazu <c/><a cbot|turn>turn</a>(<a cbot|direct>direction</a>(item.position));<n/> uložíme úhel pro otočení do proměnné <code>angle</code>:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:52
|
||||
#, no-wrap
|
||||
msgid "\tangle = direction(item.position);"
|
||||
msgstr "\tangle = direction(item.position);"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:54
|
||||
#, no-wrap
|
||||
msgid "Then we perform the rotation, and we set the power of the motors so that the bot continues the movement:"
|
||||
msgstr "Pak robota otočíme a nastavíme výkon motorů, aby robot zatáčel dále:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:56
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"\tturn(angle);\n"
|
||||
"\tif (angle < 0)\n"
|
||||
"\t{\n"
|
||||
"\t\tmotor(1,0.5);\n"
|
||||
"\t}\n"
|
||||
"\telse\n"
|
||||
"\t{\n"
|
||||
"\t\tmotor(0.5,1);\n"
|
||||
"\t}"
|
||||
msgstr ""
|
||||
"\tturn(angle);\n"
|
||||
"\tif (angle < 0)\n"
|
||||
"\t{\n"
|
||||
"\t\tmotor(1,0.5);\n"
|
||||
"\t}\n"
|
||||
"\telse\n"
|
||||
"\t{\n"
|
||||
"\t\tmotor(0.5,1);\n"
|
||||
"\t}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:66
|
||||
#, no-wrap
|
||||
msgid "The instruction <code>else</code> determines what instructions the program should execute if the condition stated in the <code>if</code> instruction is false."
|
||||
msgstr "Příkaz <code>else</code> označuje blok, který se provede v případě, když podmínka v příkazu <code>if</code> neplatí."
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:68
|
||||
#, no-wrap
|
||||
msgid "Then we must set the power of the jet so that the bot follows the wasp also in the vertical direction:"
|
||||
msgstr "Nakonec musíme nastavit i výkon tryskového motoru, aby robot udržoval stejnou letovou výšku jako vosa:"
|
||||
|
||||
#. type: Source code
|
||||
#: ../help/help.E.txt:70
|
||||
#, no-wrap
|
||||
msgid ""
|
||||
"\tjet(0);\n"
|
||||
"\tif(position.z > item.position.z)\n"
|
||||
"\t{\n"
|
||||
"\t\tjet(-0.3);\n"
|
||||
"\t}\n"
|
||||
"\t\n"
|
||||
"\tif(position.z < item.position.z - 1)\n"
|
||||
"\t{\n"
|
||||
"\t\tjet(0.3);\n"
|
||||
"\t}"
|
||||
msgstr ""
|
||||
"\tjet(0);\n"
|
||||
"\tif(position.z > item.position.z)\n"
|
||||
"\t{\n"
|
||||
"\t\tjet(-0.3);\n"
|
||||
"\t}\n"
|
||||
"\t\n"
|
||||
"\tif(position.z < item.position.z - 1)\n"
|
||||
"\t{\n"
|
||||
"\t\tjet(0.3);\n"
|
||||
"\t}"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:81
|
||||
#, no-wrap
|
||||
msgid "As you will see, this program is much more efficient than the previous one!"
|
||||
msgstr "Uvidíte, že tento programu bude mnohem úspěšnější než ten předchozí!"
|
||||
|
||||
#. type: \t; header
|
||||
#: ../help/help.E.txt:83
|
||||
#, no-wrap
|
||||
msgid "See also"
|
||||
msgstr "Užitečné odkazy"
|
||||
|
||||
#. type: Plain text
|
||||
#: ../help/help.E.txt:84
|
||||
#, 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>."
|
Loading…
Reference in New Issue