Changeset 7149
- Timestamp:
- 2016-04-16 14:58:37 (7 years ago)
- Location:
- 2015/koodauskerho/AarreP
- Files:
-
- 15 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/koodauskerho/AarreP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.cs
r7131 r7149 17 17 Image pelaajanKuva = LoadImage("originalhahmo"); 18 18 Image tahtiKuva = LoadImage("sydansydan"); 19 Image vihuKuva = LoadImage("vihu"); 20 19 Image vihuKuva = LoadImage("originalvihu"); 20 Image KuolemaKuva = LoadImage("kuolema"); 21 Image AmpujaKuva = LoadImage("ampujahahmo"); 21 22 Image[] animaatioKuvat = LoadImages("originalhahmo", "hahmosydan","hahmosyosydan"); 22 23 … … 33 34 Camera.ZoomFactor = 1.2; 34 35 Camera.StayInLevel = true; 36 37 MediaPlayer.Play("musa"); 38 MediaPlayer.IsRepeating = true; 35 39 } 36 40 … … 67 71 void LisaaPelaaja(Vector paikka, double leveys, double korkeus) 68 72 { 69 pelaaja1 = new PlatformCharacter( 70, 70);73 pelaaja1 = new PlatformCharacter(30, 70); 70 74 pelaaja1.Position = paikka; 71 75 pelaaja1.Mass = 9.0; 72 76 pelaaja1.Image = pelaajanKuva; 73 77 AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 78 AddCollisionHandler(pelaaja1, "vihu", TormaaVihuun); 79 74 80 Add(pelaaja1); 75 81 } 76 82 void LisaaVihu(Vector paikka, double leveys, double korkeus) 77 83 { 78 pelaaja1 = new PlatformCharacter(70, 70);79 pelaaja1.Position = paikka;80 pelaaja1.Mass = 9.0;81 pelaaja1.Image = pelaajanKuva;82 AddCollisionHandler(pelaaja1, "vihu", TormaaTahteen);83 Add( pelaaja1);84 PlatformCharacter vihu = new PlatformCharacter(50, 70); 85 vihu.Position = paikka; 86 vihu.Mass = 9.0; 87 vihu.Image = vihuKuva; 88 vihu.Tag = "vihu"; 89 Add(vihu); 84 90 } 85 91 … … 92 98 Keyboard.Listen(Key.Right, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, nopeus); 93 99 Keyboard.Listen(Key.Up, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 100 94 101 95 102 ControllerOne.Listen(Button.Back, ButtonState.Pressed, Exit, "Poistu pelistä"); … … 122 129 pelaaja1.PlayAnimation(animaatio); 123 130 } 131 void AmpuuVihun(PhysicsObject ampujahahmo, PhysicsObject vihu) 132 { 133 maaliAani.Play(); 134 MessageDisplay.Add("ammuit vihun"); 135 vihu.Destroy(); 136 137 Animation animaatio = new Animation(animaatioKuvat); 138 animaatio.FPS = 2; 139 pelaaja1.PlayAnimation(animaatio); 140 } 124 141 void TormaaVihuun(PhysicsObject hahmo, PhysicsObject vihu) 125 142 { … … 127 144 MessageDisplay.Add("kuolit :("); 128 145 hahmo.Destroy(); 146 147 PhysicsObject kuva = PhysicsObject.CreateStaticObject(500, 500); 148 kuva.Position = hahmo.Position; 149 kuva.Image = KuolemaKuva; 150 Add(kuva); 129 151 } 130 152 } -
2015/koodauskerho/AarreP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.csproj.Debug.cachefile
r7131 r7149 2 2 Content\norsu.xnb 3 3 Content\tahti.xnb 4 Content\kentta1.xnb5 4 Content\sydansydan.xnb 6 5 Content\originalhahmo.xnb … … 8 7 Content\hahmosydan.xnb 9 8 Content\vihu.xnb 9 Content\kentta1.xnb 10 Content\originalvihu.xnb 11 Content\kuolema.xnb 12 Content\musa.xnb 13 Content\ampujahahmo.xnb 14 Content\musa.wma -
2015/koodauskerho/AarreP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml
r7131 r7149 9 9 <Options>None</Options> 10 10 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\maali.xnb</Output> 11 <Time>2016-0 3-12T10:40:41.472148+02:00</Time>11 <Time>2016-04-16T10:21:37.100332+03:00</Time> 12 12 </Item> 13 13 <Item> … … 18 18 <Options>None</Options> 19 19 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\norsu.xnb</Output> 20 <Time>2016-0 3-12T10:40:41.4731481+02:00</Time>20 <Time>2016-04-16T10:21:37.163332+03:00</Time> 21 21 </Item> 22 22 <Item> … … 27 27 <Options>None</Options> 28 28 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\tahti.xnb</Output> 29 <Time>2016-03-12T10:40:41.4741482+02:00</Time> 29 <Time>2016-04-16T10:21:37.245332+03:00</Time> 30 </Item> 31 <Item> 32 <Source>sydansydan.png</Source> 33 <Name>sydansydan</Name> 34 <Importer>TextureImporter</Importer> 35 <Processor>TextureProcessor</Processor> 36 <Options>None</Options> 37 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\sydansydan.xnb</Output> 38 <Time>2016-04-16T10:21:37.104332+03:00</Time> 39 </Item> 40 <Item> 41 <Source>originalhahmo.png</Source> 42 <Name>originalhahmo</Name> 43 <Importer>TextureImporter</Importer> 44 <Processor>TextureProcessor</Processor> 45 <Options>None</Options> 46 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\originalhahmo.xnb</Output> 47 <Time>2016-04-16T10:21:37.109332+03:00</Time> 48 </Item> 49 <Item> 50 <Source>hahmosyosydan.png</Source> 51 <Name>hahmosyosydan</Name> 52 <Importer>TextureImporter</Importer> 53 <Processor>TextureProcessor</Processor> 54 <Options>None</Options> 55 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\hahmosyosydan.xnb</Output> 56 <Time>2016-04-16T10:21:37.159332+03:00</Time> 57 </Item> 58 <Item> 59 <Source>hahmosydan.png</Source> 60 <Name>hahmosydan</Name> 61 <Importer>TextureImporter</Importer> 62 <Processor>TextureProcessor</Processor> 63 <Options>None</Options> 64 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\hahmosydan.xnb</Output> 65 <Time>2016-04-16T10:21:37.249332+03:00</Time> 66 </Item> 67 <Item> 68 <Source>vihu.png</Source> 69 <Name>vihu</Name> 70 <Importer>TextureImporter</Importer> 71 <Processor>TextureProcessor</Processor> 72 <Options>None</Options> 73 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\vihu.xnb</Output> 74 <Time>2016-04-16T10:34:25.840332+03:00</Time> 30 75 </Item> 31 76 <Item> … … 36 81 <Options>None</Options> 37 82 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\kentta1.xnb</Output> 38 <Time>2016-0 3-12T14:27:22.3415999+02:00</Time>83 <Time>2016-04-16T14:53:21.9058695+03:00</Time> 39 84 </Item> 40 85 <Item> 41 <Source> sydansydan.png</Source>42 <Name> sydansydan</Name>86 <Source>originalvihu.png</Source> 87 <Name>originalvihu</Name> 43 88 <Importer>TextureImporter</Importer> 44 89 <Processor>TextureProcessor</Processor> 45 90 <Options>None</Options> 46 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\ sydansydan.xnb</Output>47 <Time>2016-0 3-12T13:24:52.6839219+02:00</Time>91 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\originalvihu.xnb</Output> 92 <Time>2016-04-16T10:57:15.116332+03:00</Time> 48 93 </Item> 49 94 <Item> 50 <Source> originalhahmo.png</Source>51 <Name> originalhahmo</Name>95 <Source>kuolema.png</Source> 96 <Name>kuolema</Name> 52 97 <Importer>TextureImporter</Importer> 53 98 <Processor>TextureProcessor</Processor> 54 99 <Options>None</Options> 55 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\ originalhahmo.xnb</Output>56 <Time>2016-0 3-12T13:11:45.7491398+02:00</Time>100 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\kuolema.xnb</Output> 101 <Time>2016-04-16T12:58:54.8090104+03:00</Time> 57 102 </Item> 58 103 <Item> 59 <Source>hahmosyosydan.png</Source> 60 <Name>hahmosyosydan</Name> 104 <Source>musa.mp3</Source> 105 <Name>musa</Name> 106 <Importer>Mp3Importer</Importer> 107 <Processor>SongProcessor</Processor> 108 <Options>None</Options> 109 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\musa.xnb</Output> 110 <Extra>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\musa.wma</Extra> 111 <Time>2016-04-16T14:03:31.5478636+03:00</Time> 112 </Item> 113 <Item> 114 <Source>ampujahahmo.png</Source> 115 <Name>ampujahahmo</Name> 61 116 <Importer>TextureImporter</Importer> 62 117 <Processor>TextureProcessor</Processor> 63 118 <Options>None</Options> 64 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\hahmosyosydan.xnb</Output> 65 <Time>2016-03-12T13:11:48.2139556+02:00</Time> 66 </Item> 67 <Item> 68 <Source>hahmosydan.png</Source> 69 <Name>hahmosydan</Name> 70 <Importer>TextureImporter</Importer> 71 <Processor>TextureProcessor</Processor> 72 <Options>None</Options> 73 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\hahmosydan.xnb</Output> 74 <Time>2016-03-12T13:49:20.7800876+02:00</Time> 75 </Item> 76 <Item> 77 <Source>vihu.png</Source> 78 <Name>vihu</Name> 79 <Importer>TextureImporter</Importer> 80 <Processor>TextureProcessor</Processor> 81 <Options>None</Options> 82 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\vihu.xnb</Output> 83 <Time>2016-03-12T13:59:15.0918688+02:00</Time> 119 <Output>C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\ampujahahmo.xnb</Output> 120 <Time>2016-04-16T14:33:45.2722179+03:00</Time> 84 121 </Item> 85 122 <BuildSuccessful>true</BuildSuccessful> … … 130 167 <Assembly> 131 168 <Key>C:\Windows\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Content.Pipeline\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Content.Pipeline.dll</Key> 132 <Value>2015-09-16T 20:11:40.0406455+03:00</Value>169 <Value>2015-09-16T13:26:51.0674639+03:00</Value> 133 170 </Assembly> 134 171 </Assemblies> -
2015/koodauskerho/AarreP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/Tasohyppelypeli1.csproj.FileListAbsolute.txt
r7131 r7149 16 16 C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\hahmosydan.xnb 17 17 C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\vihu.xnb 18 C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\originalvihu.xnb 19 C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\kuolema.xnb 20 C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\musa.xnb 21 C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\musa.wma 22 C:\MyTemp\AarreP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\ampujahahmo.xnb -
2015/koodauskerho/AarreP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt
r7131 r7149 2 2 Content\norsu.xnb 3 3 Content\tahti.xnb 4 Content\kentta1.xnb5 4 Content\sydansydan.xnb 6 5 Content\originalhahmo.xnb … … 8 7 Content\hahmosydan.xnb 9 8 Content\vihu.xnb 9 Content\kentta1.xnb 10 Content\originalvihu.xnb 11 Content\kuolema.xnb 12 Content\musa.xnb 13 Content\musa.wma 14 Content\ampujahahmo.xnb -
2015/koodauskerho/AarreP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/Tasohyppelypeli1Content.contentproj
r7131 r7149 102 102 </Compile> 103 103 </ItemGroup> 104 <ItemGroup> 105 <Compile Include="originalvihu.png"> 106 <Name>originalvihu</Name> 107 <Importer>TextureImporter</Importer> 108 <Processor>TextureProcessor</Processor> 109 </Compile> 110 </ItemGroup> 111 <ItemGroup> 112 <Compile Include="kuolema.png"> 113 <Name>kuolema</Name> 114 <Importer>TextureImporter</Importer> 115 <Processor>TextureProcessor</Processor> 116 </Compile> 117 </ItemGroup> 118 <ItemGroup> 119 <Compile Include="musa.mp3"> 120 <Name>musa</Name> 121 <Importer>Mp3Importer</Importer> 122 <Processor>SongProcessor</Processor> 123 </Compile> 124 </ItemGroup> 125 <ItemGroup> 126 <Compile Include="ampujahahmo.png"> 127 <Name>ampujahahmo</Name> 128 <Importer>TextureImporter</Importer> 129 <Processor>TextureProcessor</Processor> 130 </Compile> 131 </ItemGroup> 104 132 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 105 133 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2015/koodauskerho/AarreP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/kentta1.txt
r7131 r7149 1 * 2 ## 3 4 * * 5 ## ##6 7 * * 8 ## ## ## 9 10 * * * * 11 ## ## ## ## 12 13 * * * * 14 ## ## ## ## ## 15 16 N17 ###################################################################### 1 *...................................................................... 2 ##..................................................................... 3 ....................................................................... 4 * *................................................................... 5 ## N ##.................................................................. 6 .......................................vvv............................... 7 * *................................................................. 8 ## ## ##............................##.########.......................... 9 .....................................#.............#....................... 10 * * * * ..................#..............###........................ 11 ## ## ## ##..................#..............#...........#................. 12 ..................................#.......##................................. 13 * * * *....................#........................................ 14 ## ## ## ## ## ********* ############################################## 15 ............................................................................... 16 .................................v..v..v................................ 17 ######################################################################..........
Note: See TracChangeset
for help on using the changeset viewer.