Changeset 8212
- Timestamp:
- 2016-07-28 14:54:13 (7 years ago)
- Location:
- 2016/30/KasimirP
- Files:
-
- 24 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
2016/30/KasimirP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.cs
r8172 r8212 16 16 PlatformCharacter Vihollinen; 17 17 18 PhysicsObject lentokone; 19 18 20 Image pelaajanKuva = LoadImage("Dat_boi1"); 19 21 Image tahtiKuva = LoadImage("leaf"); 20 22 Image VihollisenKuva = LoadImage("pepexd"); 21 23 Image Veri = LoadImage("veri"); 24 Image Palikka = LoadImage("Palikka"); 25 Image Shrek = LoadImage("Shrekxd"); 26 Image kek = LoadImage("art"); 27 Image lava = LoadImage("laava"); 28 Image Lentsikka = LoadImage("yee"); 22 29 private Image[] ukkelinKavely = LoadImages("Dat_boi1", "Dat_boi2", "Dat_boi3", "Dat_boi4", "Dat_boi5"); 23 30 24 //SoundEffect maaliAani = LoadSoundEffect("Smoke Weed Everyday Sound Effect"); 31 Color[] colors = { Color.Red, Color.Green, Color.Blue, Color.Yellow, Color.Pink }; 32 int index = 0; 33 34 bool SuperVoima = false; 35 36 //SoundEffect maaliAani = LoadSoundEffect("illuminati"); 25 37 26 38 public override void Begin() … … 30 42 LuoKentta(); 31 43 LisaaNappaimet(); 32 44 Level.CreateBorders(); 33 45 Camera.Follow(pelaaja1); 34 46 Camera.ZoomFactor = 1.2; … … 45 57 kentta.SetTileMethod('N', LisaaPelaaja); 46 58 kentta.SetTileMethod('X', LisaaVihollinen); 59 kentta.SetTileMethod('K', LisaaShrek); 60 kentta.SetTileMethod('L', LisaaLaava); 61 kentta.SetTileMethod('F', LisaaLentovihu); 47 62 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 48 Level.CreateBorders(); 49 Level.Background.CreateGradient(Color.White, Color.LimeGreen); 63 64 //Level.Background.CreateGradient(Color.White, Color.LimeGreen); 65 Level.Background.Image = kek; 66 Level.Background.FitToLevel(); 67 Level.Background.TextureWrapSize = new Vector(3, 1); 68 69 FollowerBrain BRAIN = new FollowerBrain(pelaaja1); 70 BRAIN.Speed = 1000; 71 BRAIN.DistanceFar = 100; 72 BRAIN.FarBrain = new RandomMoverBrain(); 73 //lentokone.Brain = BRAIN; 50 74 51 75 } … … 55 79 PhysicsObject taso = PhysicsObject.CreateStaticObject(leveys, korkeus); 56 80 taso.Position = paikka; 57 taso.Color = Color.Green; 81 taso.Image = Palikka; 82 83 //taso.Color = Color.Green; 58 84 Add(taso); 85 } 86 87 void LisaaLaava(Vector paikka, double leveys, double korkeus) 88 { 89 PhysicsObject Laava = PhysicsObject.CreateStaticObject(leveys, korkeus); 90 Laava.Position = paikka; 91 Laava.Image = lava; 92 Laava.Tag = "Laava"; 93 Add(Laava); 94 95 59 96 } 60 97 … … 77 114 AddCollisionHandler(pelaaja1, "tahti", TormaaTahteen); 78 115 AddCollisionHandler(pelaaja1, "Vihollinen", TormaaViholliseen); 116 AddCollisionHandler(pelaaja1, "Shrek", TormaaShrekiin); 117 AddCollisionHandler(pelaaja1, "Laava", TormaaLaavaan); 118 AddCollisionHandler(pelaaja1, "Tahti", TormaaTahteen); 119 79 120 Add(pelaaja1); 80 121 pelaaja1.Animation = new Animation(ukkelinKavely); … … 102 143 Vihollinen.Brain = tasoAivot; 103 144 104 145 146 147 148 } 149 150 void LisaaLentovihu(Vector paikka, double leveys, double korkeus) 151 { 152 lentokone = new PhysicsObject(Lentsikka); 153 lentokone.Width /= 10; 154 lentokone.Height /= 10; 155 156 lentokone.Position = paikka; 157 lentokone.IgnoresGravity = true; 158 Add(lentokone); 159 } 160 161 void LisaaShrek(Vector paikka, double leveys, double korkeus) 162 { 163 164 PhysicsObject s = PhysicsObject.CreateStaticObject(Shrek); 165 s.Mass = 0; 166 s.Position = paikka + new Vector(0, s.Height / 43 / 2); 167 s.Width /= 20; 168 s.Height /= 20; 169 s.Tag = "Shrek"; 170 171 172 173 Add(s); 105 174 } 106 175 … … 140 209 pelaaja1.Animation.Start(); 141 210 } 211 212 /*Level.Background.Color = colors[index]; 213 214 if (index + 1 >= colors.Length) 215 { 216 index = 0; 217 } 218 else 219 { 220 index++; 221 }*/ 142 222 } 143 223 … … 154 234 void TormaaTahteen(PhysicsObject hahmo, PhysicsObject tahti) 155 235 { 156 //maaliAani.Play(); 236 //§§maaliAani.Play(); 237 Supervoima(); 157 238 MessageDisplay.Add("Keräsit superlehden xd!"); 158 239 tahti.Destroy(); 159 240 } 160 241 //kekeskafjajs 161 242 void TormaaViholliseen(PhysicsObject a, PhysicsObject b) 162 243 { 244 if (SuperVoima == true) 245 { 246 ExplosionSystem rajahdusSysteemi = new ExplosionSystem(VihollisenKuva, 50); 247 248 Add(rajahdusSysteemi); 249 250 rajahdusSysteemi.AddEffect(b.Position, 50); 251 b.Destroy(); 252 } 253 else 254 { 255 ExplosionSystem rajahdusSysteemi = new ExplosionSystem(Veri, 50); 256 257 Add(rajahdusSysteemi); 258 259 rajahdusSysteemi.AddEffect(a.Position, 50); 260 a.Destroy(); 261 } 262 } 263 264 void TormaaShrekiin(PhysicsObject a, PhysicsObject b) 265 { 163 266 ExplosionSystem rajahdusSysteemi = new ExplosionSystem(Veri, 50); 164 267 165 268 Add(rajahdusSysteemi); 166 269 167 270 rajahdusSysteemi.AddEffect(a.Position, 50); 168 271 a.Destroy(); 169 170 } 272 } 273 274 void TormaaLaavaan(PhysicsObject a, PhysicsObject b) 275 { 276 ExplosionSystem rajahdusSysteemi = new ExplosionSystem(Veri, 50); 277 278 Add(rajahdusSysteemi); 279 280 rajahdusSysteemi.AddEffect(a.Position, 50); 281 a.Destroy(); 282 } 283 284 void Supervoima() 285 { 286 SuperVoima = true; 287 Timer.SingleShot(7, LopetaSuperVoima); 288 } 289 290 void LopetaSuperVoima () 291 { 292 MessageDisplay.Add("Supervoima loppui xdddd"); 293 SuperVoima = false; 294 } 295 171 296 } -
2016/30/KasimirP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1.csproj.Debug.cachefile
r8172 r8212 13 13 Content\veri.xnb 14 14 Content\Shrekxd.xnb 15 Content\Palikka.xnb 16 Content\art.xnb 17 Content\laava.xnb 18 Content\illuminati.xnb 19 Content\yee.xnb 20 Content\illuminati.wma -
2016/30/KasimirP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml
r8172 r8212 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\kentta1.xnb</Output> 38 <Time>2016-07-2 7T14:32:21.8097907+03:00</Time>38 <Time>2016-07-28T14:53:05.2303945+03:00</Time> 39 39 </Item> 40 40 <Item> … … 117 117 <Options>None</Options> 118 118 <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\veri.xnb</Output> 119 <Time>2016-07-2 7T14:38:38.5507907+03:00</Time>119 <Time>2016-07-28T10:04:00.7894497+03:00</Time> 120 120 </Item> 121 121 <Item> … … 127 127 <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Shrekxd.xnb</Output> 128 128 <Time>2016-07-27T15:00:24.5557907+03:00</Time> 129 </Item> 130 <Item> 131 <Source>Palikka.png</Source> 132 <Name>Palikka</Name> 133 <Importer>TextureImporter</Importer> 134 <Processor>TextureProcessor</Processor> 135 <Options>None</Options> 136 <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Palikka.xnb</Output> 137 <Time>2016-07-28T10:14:45.8071497+03:00</Time> 138 </Item> 139 <Item> 140 <Source>art.jpg</Source> 141 <Name>art</Name> 142 <Importer>TextureImporter</Importer> 143 <Processor>TextureProcessor</Processor> 144 <Options>None</Options> 145 <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\art.xnb</Output> 146 <Time>2016-07-28T11:12:43.9249188+03:00</Time> 147 </Item> 148 <Item> 149 <Source>laava.png</Source> 150 <Name>laava</Name> 151 <Importer>TextureImporter</Importer> 152 <Processor>TextureProcessor</Processor> 153 <Options>None</Options> 154 <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\laava.xnb</Output> 155 <Time>2016-07-28T11:29:47.2541764+03:00</Time> 156 </Item> 157 <Item> 158 <Source>illuminati.wma</Source> 159 <Name>illuminati</Name> 160 <Importer>WmaImporter</Importer> 161 <Processor>SongProcessor</Processor> 162 <Options>None</Options> 163 <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\illuminati.xnb</Output> 164 <Extra>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\illuminati.wma</Extra> 165 <Time>2016-07-28T12:57:41.3684964+03:00</Time> 166 </Item> 167 <Item> 168 <Source>yee.png</Source> 169 <Name>yee</Name> 170 <Importer>TextureImporter</Importer> 171 <Processor>TextureProcessor</Processor> 172 <Options>None</Options> 173 <Output>C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\yee.xnb</Output> 174 <Time>2016-07-28T13:36:50.8149752+03:00</Time> 129 175 </Item> 130 176 <BuildSuccessful>true</BuildSuccessful> -
2016/30/KasimirP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/Tasohyppelypeli1.csproj.FileListAbsolute.txt
r8172 r8212 21 21 C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\veri.xnb 22 22 C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Shrekxd.xnb 23 C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\Palikka.xnb 24 C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\art.xnb 25 C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\laava.xnb 26 C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\illuminati.xnb 27 C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\illuminati.wma 28 C:\MyTemp\KasimirP\Tasohyppelypeli1\Tasohyppelypeli1\Tasohyppelypeli1\bin\x86\Debug\Content\yee.xnb -
2016/30/KasimirP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt
r8172 r8212 13 13 Content\veri.xnb 14 14 Content\Shrekxd.xnb 15 Content\Palikka.xnb 16 Content\art.xnb 17 Content\laava.xnb 18 Content\illuminati.xnb 19 Content\illuminati.wma 20 Content\yee.xnb -
2016/30/KasimirP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/Tasohyppelypeli1Content.contentproj
r8172 r8212 116 116 </ItemGroup> 117 117 <ItemGroup> 118 <Compile Include="Shrekxd.png"> 119 <Name>Shrekxd</Name> 120 <Importer>TextureImporter</Importer> 121 <Processor>TextureProcessor</Processor> 122 </Compile> 123 </ItemGroup> 124 <ItemGroup> 118 125 <Compile Include="veri.png"> 119 126 <Name>veri</Name> … … 123 130 </ItemGroup> 124 131 <ItemGroup> 125 <Compile Include="Shrekxd.png"> 126 <Name>Shrekxd</Name> 132 <Compile Include="Palikka.png"> 133 <Name>Palikka</Name> 134 <Importer>TextureImporter</Importer> 135 <Processor>TextureProcessor</Processor> 136 </Compile> 137 </ItemGroup> 138 <ItemGroup> 139 <Compile Include="art.jpg"> 140 <Name>art</Name> 141 <Importer>TextureImporter</Importer> 142 <Processor>TextureProcessor</Processor> 143 </Compile> 144 </ItemGroup> 145 <ItemGroup> 146 <Compile Include="laava.png"> 147 <Name>laava</Name> 148 <Importer>TextureImporter</Importer> 149 <Processor>TextureProcessor</Processor> 150 </Compile> 151 </ItemGroup> 152 <ItemGroup> 153 <Compile Include="illuminati.wma"> 154 <Name>illuminati</Name> 155 <Importer>WmaImporter</Importer> 156 <Processor>SongProcessor</Processor> 157 </Compile> 158 </ItemGroup> 159 <ItemGroup> 160 <Compile Include="yee.png"> 161 <Name>yee</Name> 127 162 <Importer>TextureImporter</Importer> 128 163 <Processor>TextureProcessor</Processor> -
2016/30/KasimirP/Tasohyppelypeli1/Tasohyppelypeli1/Tasohyppelypeli1Content/kentta1.txt
r8172 r8212 1 ..................................... 2 . 3 ............................#######............. 4 .......................X........................X.......#### 5 .N..................######....................######## 6 ........**********...............*........................ 7 ##################.............#####...#### 1 2 3 ............................#######.......................X....X...X......X...X.........X*................. 4 .......................X.................###....X.......########################........###................ 5 .N..................######.....................########..........................X......................... 6 .................................*.............................................#####....................... 7 ##################.............#####...####................................................................ 8 ##################LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL
Note: See TracChangeset
for help on using the changeset viewer.