<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://peda.net/:static/535/atom.xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>4 Pelin animointi</title>
<id>https://peda.net/id/a7749e042</id>
<updated>2015-07-20T13:47:02+03:00</updated>
<link href="https://peda.net/id/a7749e042:atom" rel="self" />
<link href="https://peda.net/p/henril/ohjelmointi/scratch/4-pelin-animointi#top" rel="alternate" />
<logo>https://peda.net/:static/535/peda.net.logo.bg.svg</logo>
<rights type="html">&lt;div class=&quot;license&quot;&gt;Tämän sivun lisenssi &lt;a rel=&quot;license&quot; href=&quot;https://peda.net/info&quot;&gt;Peda.net-yleislisenssi&lt;/a&gt;&lt;/div&gt;&#10;</rights>

<entry>
<title>4 Pelin animointi</title>
<id>https://peda.net/id/b07cd1b02</id>
<updated>2015-09-15T20:37:17+03:00</updated>
<link href="https://peda.net/p/henril/ohjelmointi/scratch/4-pelin-animointi/4-pelin-animointi#top" />
<content type="html">Jotta peli olisi aidomman näköinen, kannattaa animoida ainakin hahmon liike. Animoin tässä esimerkissä Jetpak-miehen perään muuttuvat liekit. Teen myös räjähdyksen, joka tapahtuu kun hahmo törmää seinään. Animointiin on annettu ohjeita jo harjoituksessa 2!&lt;br/&gt;&#10;&lt;br/&gt;&#10;&lt;span class=&quot;center&quot;&gt;&lt;a href=&quot;https://peda.net/p/henril/ohjelmointi/scratch/4-pelin-animointi/4-pelin-animointi/capture-png#top&quot; title=&quot;Capture.PNG&quot;&gt;&lt;img src=&quot;https://peda.net/p/henril/ohjelmointi/scratch/4-pelin-animointi/4-pelin-animointi/capture-png:file/photo/7716ad77cd8465ff0a4ccb9bd50c11da918f1b45/Capture.PNG&quot; alt=&quot;&quot; title=&quot;Capture.PNG&quot; class=&quot;inline&quot; loading=&quot;lazy&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&#10;Loin 4 erilaista hahmoa, joilla on hieman erilaiset liekit ja jalkojen asento. Alla olevalla komennolla saadaan hahmo muuttamaan asustetta.&lt;br/&gt;&#10;&lt;br/&gt;&#10;&lt;span class=&quot;center&quot;&gt;&lt;a href=&quot;https://peda.net/p/henril/ohjelmointi/scratch/4-pelin-animointi/4-pelin-animointi/capture-png3#top&quot; title=&quot;Capture.PNG&quot;&gt;&lt;img src=&quot;https://peda.net/p/henril/ohjelmointi/scratch/4-pelin-animointi/4-pelin-animointi/capture-png3:file/photo/267ba388eadc6e60c1c483d9c07f85d783b40419/Capture.PNG&quot; alt=&quot;&quot; title=&quot;Capture.PNG&quot; class=&quot;inline&quot; loading=&quot;lazy&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&#10;&lt;br/&gt;&#10;Tehdään törmäykseen liittyvä räjähdys. Tämä aloitetaan piirtämällä tarpeeksi monta uutta asustetta, joissa jokaisessa räjähdys on tietyssä vaiheessa.&lt;br/&gt;&#10;&lt;br/&gt;&#10;&lt;span class=&quot;center&quot;&gt;&lt;a href=&quot;https://peda.net/p/henril/ohjelmointi/scratch/4-pelin-animointi/4-pelin-animointi/capture-pngd#top&quot; title=&quot;Capture.PNG&quot;&gt;&lt;img src=&quot;https://peda.net/p/henril/ohjelmointi/scratch/4-pelin-animointi/4-pelin-animointi/capture-pngd:file/photo/90e88d5203dc437c4cedc60590b21b019d9094a1/Capture.PNG&quot; alt=&quot;&quot; title=&quot;Capture.PNG&quot; class=&quot;inline&quot; loading=&quot;lazy&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&#10;Nyt lisätään vaan koodiin komennot, jotka vaihtavat asustetta sopivasti, kun hahmo törmää seinään.&lt;br/&gt;&#10;Uusi &amp;quot;jos&amp;quot;- lauseke kannattaa pistää yllä olevassa animoinnissa käytetyn &amp;quot;ikuisesti&amp;quot;- lausekkeen sisään.&lt;br/&gt;&#10;Räjähdyksen päätyttyä kannattaa hahmo piilottaa, vaihtaa sille normaali asuste ja palauttaa se lähtöpisteeseen ja näyttää uudelleen.&lt;br/&gt;&#10;&lt;br/&gt;&#10;&lt;span class=&quot;center&quot;&gt;&lt;a href=&quot;https://peda.net/p/henril/ohjelmointi/scratch/4-pelin-animointi/4-pelin-animointi/capture-png9#top&quot; title=&quot;Capture.PNG&quot;&gt;&lt;img src=&quot;https://peda.net/p/henril/ohjelmointi/scratch/4-pelin-animointi/4-pelin-animointi/capture-png9:file/photo/4b9f7a48ddb940941dd4e581de53df9a3168b663/Capture.PNG&quot; alt=&quot;&quot; title=&quot;Capture.PNG&quot; class=&quot;inline&quot; loading=&quot;lazy&quot;/&gt;&lt;/a&gt;&lt;/span&gt;&lt;br/&gt;&#10;&lt;br/&gt;&#10;Pelin tätä vaihetta voit käydä tarkastelemassa &lt;a href=&quot;https://scratch.mit.edu/projects/76935702/&quot; rel=&quot;nofollow ugc noopener&quot;&gt;täältä.&lt;/a&gt;&lt;br/&gt;&#10;&lt;br/&gt;&#10;</content>
<published>2015-07-20T13:47:17+03:00</published>
</entry>


</feed>