Cov txheej txheem:
- Kauj Ruam 1: Kev txav ntawm Lub Nkoj
- Kauj Ruam 2: Tua Tus Kheej
- Kauj Ruam 3: Ua Tus Yeeb Yam Hloov Pauv
- Kauj Ruam 4: Qhov No Yuav Ua Li Cas Zoo Li Cas
Video: Yuav Ua Li Cas Caum Cov Neeg Txom Nyem Ntawm Micro Bit.: 4 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Yog li thawj kauj ruam yog tsim peb lub nkoj. Koj mus rau "Basic" thiab ntxiv qhov "On start" block. Tom qab ntawd koj mus rau "Variables" thiab koj tsim qhov sib txawv hu ua "SHIP" thiab xaiv qhov thaiv los ntawm "Variables" tab uas hais tias "Set sprite to 0". Tom qab ntawd koj muab "SHIP" hloov chaw "sprite". Tom qab ntawd koj mus rau "Game" tab thiab xaiv "tsim sprite ntawm x 2 y 2" thiab koj tso qhov ntawd tsis yog "0" hauv "teeb SHIP rau 0". Tom qab ntawd koj yuav muaj feem "y" rau 4 hloov ntawm 4. Tsis tas li ntawd, cov qhab nia ntsuas yog xaiv tau. Tab sis koj mus, peb tau txais peb lub nkoj, thiab cov kauj ruam tom ntej yuav yog kev txav ntawm peb lub nkoj.
Kauj Ruam 1: Kev txav ntawm Lub Nkoj
Koj mus rau lub tab nkag thiab coj cov thaiv "ntawm khawm B nias" thiab "ntawm khawm A nias". Tom qab ntawd koj mus rau Game thiab xaiv "sprite txav los ntawm 1" thiab hloov mus rau sprite rau SHIP. Muab nws tso rau ntawm "On B button pressed" block. Thiab koj ua tib yam rau A tab sis tsis txhob txav los ntawm 1 koj muab -1.
Kauj Ruam 2: Tua Tus Kheej
Yog li ua ntej koj yuav mus rau "Cov tswv yim" tom qab ntawd xaiv "On khawm A+B nias" thiab ntxiv nws rau txoj cai. Tom qab ntawd koj ua qhov hloov pauv hu ua "SHOOT", tom qab ntawd mus rau qhov sib txawv ntxiv qhov ntxiv "teeb SHOOT rau 0" thiab hloov "0" rau "tsim sprite ntawm x: _ y: _" ces xaiv "nkoj x:" hauv game game ces muab tso rau "tsim sprite ntawm x: nkoj x:". Nws tsis meej pem tab sis koj tuaj yeem nkag siab nws zoo dua los ntawm daim duab. Tom qab ntawd koj ua tib kauj ruam rau "y". Tom qab ntawd koj mus rau qhov game game tab thiab ntxiv "SHOOT hloov qhov ci ci los ntawm 88". Tom qab ntawd koj mus rau lub voj tab thiab xaiv "rov ua dua 4 zaug thiab tshaj tawm rau cov cai. Tom qab ntawd sab hauv lub tab koj tso" SHOOT hloov y los -1, tom qab ntawd tseem nyob hauv "rov ua dua" code, ntxiv "ncua 150 ms" rau qhov nrawm ntawm "SHOOT" sib txawv, tom qab ntawd tseem nyob hauv qhov khoom siv, koj mus rau qhov laj thawj thiab xaiv "if_ ces" thiab ntxiv nws mus rau qhov laj thawj. Hauv qhov chaw seem ntawm qhov laj thawj thaiv koj tso "is_touching_". Tom qab ntawd koj ntxiv qhov hloov pauv "SHOOT" thiab "ENEMY" (tsim qhov sib txawv hu ua "ENEMY", thiab peb yuav piav qhia nws tom qab). Tom qab ntawd sab hauv lub logic block ntxiv "rho tawm ENEMY" thiab "rho tawm SHOOT", tom qab ntawd yog tias koj xav tau koj tuaj yeem ntxiv qee cov nkauj lossis suab nrov thaum koj rhuav tshem tus yeeb ncuab, tom qab ntawd koj ntxiv qhov thaiv "hloov cov qhab nia los ntawm 1". Tom qab ntawd sab nraum lub voj thiab qhov laj thawj thaiv, koj ntxiv lwm "if_ ces". Tom qab ntawd koj mus rau qhov laj thawj thiab ntxiv qhov thaiv uas muaj "0 ≤ 0" ntawm qhov chaw seem. Tom qab ntawd ntawm thawj 0, koj tso "SHOOT y". Tom qab ntawd sab hauv lub logic block koj tso "rho tawm SHOOT"
Kauj Ruam 3: Ua Tus Yeeb Yam Hloov Pauv
FIrst ntxiv "ib txhis" thaiv thiab tsim qhov sib txawv hu ua "ENEMY", mus rau qhov sib txawv tab thiab ntxiv "teeb ENEMY rau _", thiab hauv qhov chaw seem tso "tsim sprite ntawm x: _ y: _". Tom qab ntawd hauv qhov chaw seem ntawm "tsim sprite" thaiv, ntxiv "xaiv random los ntawm 0 txog 4" hauv "lej" tab. Tom qab ntawd, koj ntxiv "ENEMY teeb ci rau 150" los ntawm "game" tab thiab tom qab ntawd ntxiv "ncua 100 ms" hauv qab nws. Tom qab qhov "ncua" thaiv, koj ntxiv "ENEMY tig sab xis los ntawm 90 degrees", uas nyob hauv "game" tab. Tom qab ntawd koj mus rau "voj" tab thiab ntxiv "rov ua dua 4 zaug" thiab sab hauv ntawm "voj" thaiv, koj ntxiv "ENEMY txav ny 1" thiab "ncua 500 ms". Tam sim no peb hla mus rau lub logic tab thiab ntxiv 2 block ntawm "if_ ces". Thiab sab hauv thawj qhov chaw khoob, koj ntxiv "yog _ kov _" thiab ntxiv "YEEB YAM" hauv thawj qhov chaw khoob thiab "SHIP" hauv qhov chaw thib ob uas tsis muaj dab tsi, thiab sab hauv qhov laj thawj thaiv, koj ntxiv "game over". Tam sim no hauv lwm qhov laj thawj logic, peb ntxiv "yog _ kov ntug" thiab hauv qhov chaw seem peb ntxiv "ENEMY", thiab sab hauv logiv thaiv peb ntxiv "rho ENEMY"
Kauj Ruam 4: Qhov No Yuav Ua Li Cas Zoo Li Cas
Vam tias kuv tsis phem ntawm kev piav qhia yuav ua li cas thiab vam tias koj nyiam qhov kev ua si:)
Pom zoo:
Txhim Kho Kev Txom Nyem Usb ntawm Arduino Pro Micro: 3 Cov Kauj Ruam
Txhim Kho Kev Siv Tsis Txaus Siab ntawm Arduino Pro Micro: Cov lus qhia, micro-USB ntawm Arduino clones tsis txuas nrog. Lawv zoo li sib cais, zoo li nws tshwm sim rau kuv. Thiab yog tias nws ua, txoj kab tooj liab tau tawg, ib yam nkaus Qhov no Arduino Pro Micro yog qhov clone pheej yig, tab sis tsis txhob muab nws pov tseg, kuv yuav qhia
Yuav Ua Li Cas Kho Ob Nyem Nyem: 5 Kauj Ruam
Yuav Kho Li Cas Ob Nyem Nyem: Ob npaug nyem los ntawm lub caij nplooj ntoo hlav hauv nas hloov. Lub caij nplooj ntoo hlav no tuaj yeem nkees yog li nws tsis muab lub zog tsim nyog los tswj kev sib txuas ntawm ob tus neeg sib tham (saum toj, hauv qab). Nrog kev sib xyaw av, puas tsuaj thiab oxidation ntawm thaj chaw sib cuag, kuv
Pier9: Eurion cov hniav nyiaj hniav kub rau Cov Tsiaj Uas Muaj Kev Txom Nyem: 7 Kauj Ruam (nrog Duab)
Pier9: Eurion cov hniav nyiaj hniav kub rau Cov Tsiaj Uas Muaj Kev Txom Nyem: Cov qauv tshwj xeeb ntawm cov hniav nyiaj hniav kub no pab cov tsiaj muaj kev phom sij los tswj cov cai thov ntawm lawv cov duab. Cov qauv no hu ua Eurion Constellation, nws feem ntau siv los tiv thaiv kev dag nyiaj, thiab tuaj yeem pom ntawm cov ntawv feem ntau ntawm ib ncig
Yuav Ua Li Cas Ntxiv Cov Neeg Siv Los Ntawm NUMA rau Koj Luam Ntawm N Siv NumADD Firefox Ntxiv Rau: 4 Cov Kauj Ruam
Yuav Ua Li Cas Ntxiv Cov Neeg Siv Los Ntawm NUMA rau Koj Luam Ntawm N Siv NumADD Firefox Ntxiv Ntxiv: Txhua tus siv ntawm Metanet's N tus neeg siv qib database NUMA yuav paub tias qhov cuam tshuam ntawm qhov cuam tshuam yog rau theej tus neeg siv tsim qib rau koj daim ntawv theej ntawm game. NumADD, tshem tawm qhov xav tau rau kev theej thiab muab tshuaj txhuam thiab ua kom hloov pauv qib ua haujlwm ntawm ib tus nas
Txhim Kho Ib Tus Neeg Txom Nyem Nintendo Nrog Daim Npav Tso Nyiaj Txiag: 6 Cov Kauj Ruam
Txhim Kho Nintendo Tsis Txaus Nrog Daim Npav Txuag Txiaj Ntsig: Tej zaum, zoo li kuv, koj muaj NES qub thiab tau los tshawb pom tias tsis muaj teeb meem pes tsawg zaus koj tshuab rau hauv daim cartridges, qhov kev ua si tsuas yog tsis thauj khoom. Yog li, koj tau saib hauv is taws nem yuav ua li cas kom koj cov game mus thauj khoom. Siv thawj qhov lus ceeb toom y