- Timestamp:
- 2015-06-10 13:49:00 (7 years ago)
- Location:
- 2015/24/TomasC/Tasohyppelypeli1
- Files:
-
- 10 added
- 1 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/24/TomasC/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.cs
r5952 r5993 19 19 Image pelaajanKuva = LoadImage("norsu"); 20 20 Image tahtiKuva = LoadImage("tahti"); 21 22 SoundEffect maaliAani = LoadSoundEffect("maali"); 21 Image maakuva = LoadImage("maa"); 22 Image illumanatiKuva = LoadImage("Illu"); 23 23 24 24 25 Image taustakuva = LoadImage("BR"); … … 53 54 void LuoKentta(string kentta) 54 55 { 56 57 55 58 ColorTileMap ruudut = ColorTileMap.FromLevelAsset(kentta); 56 59 … … 59 62 ruudut.SetTileMethod(Color.Red, LisaaTahti); 60 63 ruudut.SetTileMethod(Color.Gold, LisaaPelaaja); 64 ruudut.SetTileMethod(Color.DarkGray, LisaaMaali); 65 ruudut.SetTileMethod(Color.Cyan, Lisaahirvio2); 61 66 ruudut.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 62 67 Level.CreateBorders(); … … 68 73 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 69 74 taso.Position = paikka; 70 taso.Color = Color.Green; 75 taso.Image = maakuva; 76 taso.Tag = "maa"; 71 77 taso.CollisionIgnoreGroup = 3; 72 78 Add(taso); … … 91 97 AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 92 98 AddCollisionHandler(pelaaja1, "Jarmo", TormaaShrek); 99 AddCollisionHandler(pelaaja1, "maali", TormaaMaali); 93 100 pelaaja1.Tag = "Jimmy"; 94 101 Add(pelaaja1); … … 120 127 void Hyppaa(PlatformCharacter hahmo, double nopeus) 121 128 { 122 129 123 130 hahmo.Jump(nopeus); 124 131 } … … 126 133 void TormaaTahteen(PhysicsObject hahmo, PhysicsObject tahti) 127 134 { 128 maaliAani.Play();129 135 MessageDisplay.Add("PICKED UP DORITOS"); 130 136 tahti.Destroy(); 131 137 } 138 void LisaaMaali(Vector paikka, double leveys, double korkeus) 139 { 140 PhysicsObject maali = PhysicsObject.CreateStaticObject(leveys, korkeus); 141 maali.Position = paikka; 142 maali.Image = LoadImage("maali"); 143 maali.Tag = "maali"; 144 Add(maali); 145 } 146 132 147 void Lisaahirvio(Vector paikka, double leveys, double korkeus) 133 148 { … … 149 164 150 165 } 166 void Lisaahirvio2(Vector paikka, double leveys, double korkeus) 167 { 168 PhysicsObject Illu= new PhysicsObject(leveys *10, korkeus *10); 169 Illu.Position = paikka; 170 Illu.Image = LoadImage("Illu"); 171 Illu.Tag = "Jarmo"; 172 Illu.Mass = 10.0; 173 Add(Illu, 3); 174 175 FollowerBrain seuraajanAivot = new FollowerBrain("Jimmy"); 176 Illu.Brain = seuraajanAivot; 177 seuraajanAivot.Speed = 100; 178 seuraajanAivot.DistanceFar = 2000; 179 seuraajanAivot.DistanceClose = 2000; 180 seuraajanAivot.StopWhenTargetClose = false; 181 seuraajanAivot.Active = true; 182 Illu.CollisionIgnoreGroup = 3; 183 184 } 185 151 186 void TormaaShrek(PhysicsObject hahmo, PhysicsObject Jarmo) 152 187 { 153 188 hahmo.Destroy(); 154 maaliAani.Play();155 189 MessageDisplay.Add("GET OUT OF ME SWAMP"); 156 190 rajaytaShrek(Jarmo, LoadImage("Snipe"), 100); … … 161 195 162 196 } 197 void TormaaMaali(PhysicsObject pelaaja1, PhysicsObject maali) 198 { 199 seuraavakentta(); 200 } 201 163 202 void rajaytaShrek(PhysicsObject Jarmo, Image kuva, int pMax) 164 203 { … … 169 208 Add(rajahdys); 170 209 rajahdys.AddEffect(Jarmo.X, Jarmo.Y, pMax); 210 171 211 } 172 212 void Pelaaja1Tormasi(PhysicsObject pelaaja1, PhysicsObject Jarmo) -
2015/24/TomasC/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.csproj.Debug.cachefile
r5952 r5993 1 Content\maali.xnb2 1 Content\norsu.xnb 3 2 Content\tahti.xnb … … 8 7 Content\BR.xnb 9 8 Content\Kentta1.xnb 9 Content\kentta2.xnb 10 Content\maa.xnb 11 Content\aali.xnb 12 Content\maali.xnb 13 Content\Illu.xnb 10 14 Content\Kentta1.png -
2015/24/TomasC/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/ContentPipeline-{B88964E3-D150-4A29-8542-EAE6F8D61D58}.xml
r5952 r5993 2 2 <XnaContent xmlns:Pipeline="Microsoft.Xna.Framework.Content.Pipeline"> 3 3 <Asset Type="Pipeline:BuildItemCollection"> 4 <Item>5 <Source>maali.wav</Source>6 <Name>maali</Name>7 <Importer>WavImporter</Importer>8 <Processor>SoundEffectProcessor</Processor>9 <Options>None</Options>10 <Output>C:\MyTemp\TomasC\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\maali.xnb</Output>11 <Time>2015-06-08T14:01:03.8047912+03:00</Time>12 </Item>13 4 <Item> 14 5 <Source>norsu.png</Source> … … 81 72 <Options>None</Options> 82 73 <Output>C:\MyTemp\TomasC\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Kentta1.xnb</Output> 83 <Time>2015-06-09T14:40:41.5936641+03:00</Time> 74 <Time>2015-06-10T13:43:47.6705671+03:00</Time> 75 </Item> 76 <Item> 77 <Source>kentta2.png</Source> 78 <Name>kentta2</Name> 79 <Importer>TextureImporter</Importer> 80 <Processor>TextureProcessor</Processor> 81 <Options>None</Options> 82 <Output>C:\MyTemp\TomasC\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\kentta2.xnb</Output> 83 <Time>2015-06-10T12:39:09.8255402+03:00</Time> 84 </Item> 85 <Item> 86 <Source>maa.png</Source> 87 <Name>maa</Name> 88 <Importer>TextureImporter</Importer> 89 <Processor>TextureProcessor</Processor> 90 <Options>None</Options> 91 <Output>C:\MyTemp\TomasC\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\maa.xnb</Output> 92 <Time>2015-06-10T11:05:27.2509223+03:00</Time> 93 </Item> 94 <Item> 95 <Source>aali.wav</Source> 96 <Name>aali</Name> 97 <Importer>WavImporter</Importer> 98 <Processor>SoundEffectProcessor</Processor> 99 <Options>None</Options> 100 <Output>C:\MyTemp\TomasC\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\aali.xnb</Output> 101 <Time>2015-06-08T14:01:03.8047912+03:00</Time> 102 </Item> 103 <Item> 104 <Source>maali.png</Source> 105 <Name>maali</Name> 106 <Importer>TextureImporter</Importer> 107 <Processor>TextureProcessor</Processor> 108 <Options>None</Options> 109 <Output>C:\MyTemp\TomasC\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\maali.xnb</Output> 110 <Time>2015-06-10T12:49:26.6495242+03:00</Time> 111 </Item> 112 <Item> 113 <Source>Illu.png</Source> 114 <Name>Illu</Name> 115 <Importer>TextureImporter</Importer> 116 <Processor>TextureProcessor</Processor> 117 <Options>None</Options> 118 <Output>C:\MyTemp\TomasC\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Illu.xnb</Output> 119 <Time>2015-06-10T13:22:46.1706627+03:00</Time> 84 120 </Item> 85 121 <BuildSuccessful>true</BuildSuccessful> -
2015/24/TomasC/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/Tasohyppelypeli1.csproj.FileListAbsolute.txt
r5952 r5993 17 17 C:\MyTemp\TomasC\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\BR.xnb 18 18 C:\MyTemp\TomasC\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Kentta1.png 19 C:\MyTemp\TomasC\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\kentta2.xnb 20 C:\MyTemp\TomasC\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\maa.xnb 21 C:\MyTemp\TomasC\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\aali.xnb 22 C:\MyTemp\TomasC\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Illu.xnb -
2015/24/TomasC/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/cachefile-{B88964E3-D150-4A29-8542-EAE6F8D61D58}-targetpath.txt
r5952 r5993 1 Content\maali.xnb2 1 Content\norsu.xnb 3 2 Content\tahti.xnb … … 8 7 Content\BR.xnb 9 8 Content\Kentta1.xnb 9 Content\kentta2.xnb 10 Content\maa.xnb 11 Content\aali.xnb 12 Content\maali.xnb 13 Content\Illu.xnb 10 14 Content\Kentta1.png -
2015/24/TomasC/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/Tasohyppelypeli1Content.contentproj
r5952 r5993 46 46 </ItemGroup> 47 47 <ItemGroup> 48 <Compile Include=" maali.wav">49 <Name> maali</Name>48 <Compile Include="aali.wav"> 49 <Name>aali</Name> 50 50 <Importer>WavImporter</Importer> 51 51 <Processor>SoundEffectProcessor</Processor> … … 105 105 </Compile> 106 106 </ItemGroup> 107 <ItemGroup> 108 <Compile Include="kentta2.png"> 109 <Name>kentta2</Name> 110 <Importer>TextureImporter</Importer> 111 <Processor>TextureProcessor</Processor> 112 </Compile> 113 </ItemGroup> 114 <ItemGroup> 115 <Compile Include="maa.png"> 116 <Name>maa</Name> 117 <Importer>TextureImporter</Importer> 118 <Processor>TextureProcessor</Processor> 119 </Compile> 120 </ItemGroup> 121 <ItemGroup> 122 <Compile Include="maali.png"> 123 <Name>maali</Name> 124 <Importer>TextureImporter</Importer> 125 <Processor>TextureProcessor</Processor> 126 </Compile> 127 </ItemGroup> 128 <ItemGroup> 129 <Compile Include="Illu.png"> 130 <Name>Illu</Name> 131 <Importer>TextureImporter</Importer> 132 <Processor>TextureProcessor</Processor> 133 </Compile> 134 </ItemGroup> 107 135 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 108 136 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Note: See TracChangeset
for help on using the changeset viewer.