- Timestamp:
- 2015-06-11 11:35:35 (8 years ago)
- Location:
- 2015/24/OttoK/Grand Theft Norsu II
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II.csproj.Debug.cachefile
r5987 r6015 4 4 Content\tahti.xnb 5 5 Content\kaupunkitausta.xnb 6 Content\auto1kuva.xnb7 Content\kursori1.xnb8 6 Content\panos.xnb 9 7 Content\liekki.xnb 10 8 Content\rajahdys_kuva.xnb 9 Content\auto1.xnb 10 Content\tyyppi.xnb 11 11 Content\kentta1.txt 12 Content\panos.png 13 Content\liekki.png 14 Content\rajahdys_kuva.png -
2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/Grand_Theft_Norsu_II.cs
r5987 r6015 22 22 Image pelaajanKuva = LoadImage("norsu"); 23 23 Image tahtiKuva = LoadImage("tahti"); 24 Image auto1 kuva = LoadImage("auto1kuva");24 Image auto12 = LoadImage("auto1"); 25 25 Image kursorinkuva = LoadImage("kursori1"); 26 26 Image panoksenkuba = LoadImage("panos"); 27 27 Image liekinkuva = LoadImage("liekki"); 28 28 Image rajahdys_kuva = LoadImage("rajahdys_kuva"); 29 Image tyyppikuva = LoadImage("tyyppi"); 29 30 30 31 double hyppykerroin = 1.0; … … 33 34 ExplosionSystem rajahdys; 34 35 35 36 36 SoundEffect maaliAani = LoadSoundEffect("maali"); 37 37 … … 41 41 { 42 42 IsFullScreen = false; 43 SetWindowSize(1024, 768 , true);43 SetWindowSize(1024, 768); 44 44 Gravity = new Vector(0, -1000); 45 46 47 45 48 46 Mouse.IsCursorVisible = true; … … 54 52 LuoKentta(); 55 53 LisaaNappaimet(); 56 57 54 Camera.Follow(pelaaja1); 58 55 Camera.ZoomFactor = 1.2; 59 56 Camera.StayInLevel = false; 60 57 } 61 62 58 void LuoKentta() 63 59 { … … 67 63 kentta.SetTileMethod('N', LisaaPelaaja); 68 64 kentta.SetTileMethod('A', LuoAuto); 65 kentta.SetTileMethod('T', LuoTyyppi); 69 66 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 70 67 Level.CreateBorders(); … … 118 115 pelaaja1.Add(pelaajan1Ase); 119 116 Add(pelaaja1); 120 121 122 123 117 124 118 } 125 119 void MeneAutoon(PhysicsObject auto) 126 120 { 127 pelaaja1.Image = auto1 kuva;121 pelaaja1.Image = auto12; 128 122 //pelaaja1.Shape = Shape.FromImage(auto1kuva); 129 123 … … 136 130 } 137 131 138 139 140 141 132 void LisaaNappaimet() 142 133 { … … 144 135 Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); 145 136 Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli"); 146 147 137 Keyboard.Listen(Key.A, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, -nopeus); 148 138 Keyboard.Listen(Key.D, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja1, nopeus); 149 139 Keyboard.Listen(Key.W, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 150 140 Keyboard.Listen(Key.Enter, ButtonState.Down, AvaaKirjoitusIkkuna, "Avaa kirjoitusikkunan"); 151 Keyboard.Listen(Key.Left Control, ButtonState.Pressed, AsetaHyppykerroin, "Korkeampi hyppy", 1.5);152 Keyboard.Listen(Key.Left Control, ButtonState.Released, AsetaHyppykerroin, null, 1.0);141 Keyboard.Listen(Key.LeftShift, ButtonState.Pressed, AsetaHyppykerroin, "Korkeampi hyppy", 1.5); 142 Keyboard.Listen(Key.LeftShift, ButtonState.Released, AsetaHyppykerroin, null, 1.0); 153 143 //Mouse.Listen(MouseButton.Left, ButtonState.Pressed, TarkistaHiirenPainallus, "Objektin kohdalla toiminto"); 154 144 Keyboard.Listen(Key.F, ButtonState.Pressed, UlosAutosta, "Mene ulos autosta"); … … 202 192 void LuoAuto(Vector paikka, double leveys, double korkeus) 203 193 { 204 PhysicsObject auto1 = new PhysicsObject(auto1 kuva);205 auto1.Shape = Shape.FromImage(auto1kuva);206 auto1.Position = paikka + new Vector(0, 40);207 auto1.Image = auto1 kuva;194 PhysicsObject auto1 = new PhysicsObject(auto12); 195 //auto1.Shape = Shape.FromImage(auto12); 196 auto1.Position = paikka + new Vector(0, 40); 197 auto1.Image = auto12; 208 198 auto1.Tag = "auto"; 209 199 auto1.Mass = 350; 210 200 Add(auto1); 211 201 212 Mouse.ListenOn(auto1, MouseButton.Left, ButtonState.Pressed, () => MeneAutoon(auto1),"Mene Autoon"); 202 203 Mouse.ListenOn(auto1, MouseButton.Left, ButtonState.Pressed, MeneAutoon, "Mene Autoon", auto1); 213 204 214 205 } … … 320 311 { 321 312 AddCollisionHandler(ammus, "auto", TuhoaAuto); 313 AddCollisionHandler(ammus, "tyyppi", TuhoaTyyppi); 322 314 //ammus.Size *= 3; 323 315 ammus.Image = panoksenkuba; … … 358 350 rajahdyksenKohde.Destroy(); 359 351 rajahdys.AddEffect(rajahdyksenKohde.X, rajahdyksenKohde.Y, 50); 352 } 353 if (rajahdyksenKohde.Tag.Equals("tyyppi")) 354 { 355 PhysicsObject a = new PhysicsObject(1, 1) 356 ; 357 PhysicsObject tyyppi = rajahdyksenKohde as PhysicsObject; 358 TuhoaTyyppi(a, tyyppi ); 359 rajahdyksenKohde.Destroy(); 360 360 } 361 361 } … … 377 377 378 378 } 379 void LuoTyyppi(Vector paikka, double leveys, double korkeus) 380 { 381 PhysicsObject tyyppi = new PhysicsObject(leveys, korkeus); 382 tyyppi.Position = paikka; 383 tyyppi.Mass = 50; 384 tyyppi.CanRotate = true; 385 tyyppi.Tag = "tyyppi"; 386 tyyppi.Image = tyyppikuva; 387 Add(tyyppi); 388 } 389 void TuhoaTyyppi(PhysicsObject ammus, PhysicsObject tyyppi) 390 { 391 392 Timer.SingleShot(10, delegate { LuoTyyppi(tyyppi.Position, tyyppi.Width, tyyppi.Height); }); 393 tyyppi.Destroy(); 394 } 395 396 379 397 } -
2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/bin/x86/Debug/Content/kentta1.txt
r5977 r6015 2 2 #..........................................................................................................................# 3 3 #..........................................................................................................................# 4 #......... .................................................................................................................#4 #.........T.......................................................T........................................................# 5 5 #.......########..................###.........................########.....................................................# 6 6 #..........................................................................................................................# … … 8 8 #.....................................##########...............................#######.....................................# 9 9 #.................##########.........................................................................#######...............# 10 #.....................................................###......N............................. ..............................#10 #.....................................................###......N.............................T.............................# 11 11 #.##############..........................................#######........................#########.........................# 12 12 #.....................................###########..........................................................................# … … 14 14 #..................................................................#####...................................................# 15 15 #..........................................................####...................................####..######.............# 16 #.............................########.............................................................. .......................#17 #................... ........................................##############......................#######....................#16 #.............................########..............................................................T......................# 17 #...................T.......................................##############......................#######....................# 18 18 #................#######...................########...........................##########...................................# 19 19 #.......###................................................................................................................# 20 20 #..........................................................................................................................# 21 #....................................... ...................................................................................#21 #.......................................T................................................................T.................# 22 22 ############################################################################################################################ -
2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml
r6009 r6015 9 9 <Options>None</Options> 10 10 <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\kentta1.xnb</Output> 11 <Time> 0001-01-01T00:00:00</Time>11 <Time>2015-06-11T10:30:29.0854056+03:00</Time> 12 12 </Item> 13 13 <Item> … … 18 18 <Options>None</Options> 19 19 <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\maali.xnb</Output> 20 <Time> 0001-01-01T00:00:00</Time>20 <Time>2015-06-11T09:08:41.7062305+03:00</Time> 21 21 </Item> 22 22 <Item> … … 27 27 <Options>None</Options> 28 28 <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\norsu.xnb</Output> 29 <Time> 0001-01-01T00:00:00</Time>29 <Time>2015-06-11T11:30:55.3361577+03:00</Time> 30 30 </Item> 31 31 <Item> … … 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\tahti.xnb</Output> 38 <Time> 0001-01-01T00:00:00</Time>38 <Time>2015-06-11T09:08:41.8310305+03:00</Time> 39 39 </Item> 40 40 <Item> … … 45 45 <Options>None</Options> 46 46 <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\kaupunkitausta.xnb</Output> 47 <Time> 0001-01-01T00:00:00</Time>47 <Time>2015-06-11T09:08:41.9402305+03:00</Time> 48 48 </Item> 49 <BuildSuccessful>false</BuildSuccessful> 49 <Item> 50 <Source>panos.png</Source> 51 <Name>panos</Name> 52 <Importer>TextureImporter</Importer> 53 <Processor>TextureProcessor</Processor> 54 <Options>None</Options> 55 <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\panos.xnb</Output> 56 <Time>2015-06-11T11:12:25.85705+03:00</Time> 57 </Item> 58 <Item> 59 <Source>liekki.png</Source> 60 <Name>liekki</Name> 61 <Importer>TextureImporter</Importer> 62 <Processor>TextureProcessor</Processor> 63 <Options>None</Options> 64 <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\liekki.xnb</Output> 65 <Time>2015-06-11T09:42:57.8290974+03:00</Time> 66 </Item> 67 <Item> 68 <Source>rajahdys_kuva.png</Source> 69 <Name>rajahdys_kuva</Name> 70 <Importer>TextureImporter</Importer> 71 <Processor>TextureProcessor</Processor> 72 <Options>None</Options> 73 <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\rajahdys_kuva.xnb</Output> 74 <Time>2015-06-11T09:41:07.4100566+03:00</Time> 75 </Item> 76 <Item> 77 <Source>auto1.png</Source> 78 <Name>auto1</Name> 79 <Importer>TextureImporter</Importer> 80 <Processor>TextureProcessor</Processor> 81 <Options>None</Options> 82 <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\auto1.xnb</Output> 83 <Time>2015-06-11T10:07:34.5537551+03:00</Time> 84 </Item> 85 <Item> 86 <Source>tyyppi.png</Source> 87 <Name>tyyppi</Name> 88 <Importer>TextureImporter</Importer> 89 <Processor>TextureProcessor</Processor> 90 <Options>None</Options> 91 <Output>C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\tyyppi.xnb</Output> 92 <Time>2015-06-11T10:59:36.75505+03:00</Time> 93 </Item> 94 <BuildSuccessful>true</BuildSuccessful> 50 95 <Settings> 51 96 <ContentProjectGUID>{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}</ContentProjectGUID> -
2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/obj/x86/Debug/Grand Theft Norsu II.csproj.FileListAbsolute.txt
r5987 r6015 32 32 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\liekki.xnb 33 33 C:\MyTemp\otoskinn\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\rajahdys_kuva.xnb 34 C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\panos.xnb 35 C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\liekki.xnb 36 C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\rajahdys_kuva.xnb 37 C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\auto1.xnb 38 C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\panos.png 39 C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\liekki.png 40 C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\rajahdys_kuva.png 41 C:\MyTemp\OttoK\Grand Theft Norsu II\Grand Theft Norsu II\Grand Theft Norsu II\bin\x86\Debug\Content\tyyppi.xnb -
2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu II/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt
r5987 r6015 4 4 Content\tahti.xnb 5 5 Content\kaupunkitausta.xnb 6 Content\auto1kuva.xnb7 Content\kursori1.xnb8 6 Content\panos.xnb 9 7 Content\liekki.xnb 10 8 Content\rajahdys_kuva.xnb 9 Content\auto1.xnb 10 Content\tyyppi.xnb 11 11 Content\kentta1.txt 12 Content\panos.png 13 Content\liekki.png 14 Content\rajahdys_kuva.png -
2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu IIContent/Grand Theft Norsu IIContent.contentproj
r5987 r6015 76 76 </ItemGroup> 77 77 <ItemGroup> 78 <Compile Include="auto1kuva.png">79 <Name>auto1kuva</Name>80 <Importer>TextureImporter</Importer>81 <Processor>TextureProcessor</Processor>82 </Compile>83 </ItemGroup>84 <ItemGroup>85 <Compile Include="kursori1.png">86 <Name>kursori1</Name>87 <Importer>TextureImporter</Importer>88 <Processor>TextureProcessor</Processor>89 </Compile>90 </ItemGroup>91 <ItemGroup>92 78 <Compile Include="panos.png"> 93 79 <Name>panos</Name> 94 80 <Importer>TextureImporter</Importer> 95 81 <Processor>TextureProcessor</Processor> 82 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 96 83 </Compile> 97 84 </ItemGroup> … … 101 88 <Importer>TextureImporter</Importer> 102 89 <Processor>TextureProcessor</Processor> 90 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 103 91 </Compile> 104 92 </ItemGroup> … … 106 94 <Compile Include="rajahdys_kuva.png"> 107 95 <Name>rajahdys_kuva</Name> 96 <Importer>TextureImporter</Importer> 97 <Processor>TextureProcessor</Processor> 98 <CopyToOutputDirectory>Always</CopyToOutputDirectory> 99 </Compile> 100 </ItemGroup> 101 <ItemGroup> 102 <Compile Include="auto1.png"> 103 <Name>auto1</Name> 104 <Importer>TextureImporter</Importer> 105 <Processor>TextureProcessor</Processor> 106 </Compile> 107 </ItemGroup> 108 <ItemGroup> 109 <Compile Include="tyyppi.png"> 110 <Name>tyyppi</Name> 108 111 <Importer>TextureImporter</Importer> 109 112 <Processor>TextureProcessor</Processor> -
2015/24/OttoK/Grand Theft Norsu II/Grand Theft Norsu II/Grand Theft Norsu IIContent/kentta1.txt
r5977 r6015 2 2 #..........................................................................................................................# 3 3 #..........................................................................................................................# 4 #......... .................................................................................................................#4 #.........T.......................................................T........................................................# 5 5 #.......########..................###.........................########.....................................................# 6 6 #..........................................................................................................................# … … 8 8 #.....................................##########...............................#######.....................................# 9 9 #.................##########.........................................................................#######...............# 10 #.....................................................###......N............................. ..............................#10 #.....................................................###......N.............................T.............................# 11 11 #.##############..........................................#######........................#########.........................# 12 12 #.....................................###########..........................................................................# … … 14 14 #..................................................................#####...................................................# 15 15 #..........................................................####...................................####..######.............# 16 #.............................########.............................................................. .......................#17 #................... ........................................##############......................#######....................#16 #.............................########..............................................................T......................# 17 #...................T.......................................##############......................#######....................# 18 18 #................#######...................########...........................##########...................................# 19 19 #.......###................................................................................................................# 20 20 #..........................................................................................................................# 21 #....................................... ...................................................................................#21 #.......................................T................................................................T.................# 22 22 ############################################################################################################################
Note: See TracChangeset
for help on using the changeset viewer.