Changeset 7426
- Timestamp:
- 2016-06-17 11:08:58 (7 years ago)
- Location:
- 2016/24/OliverK
- Files:
-
- 66 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
2016/24/OliverK/pomppupeli/pomppupeli/pomppupeli/obj/x86/Debug/ContentPipeline-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}.xml
r7391 r7426 36 36 <Options>None</Options> 37 37 <Output>C:\MyTemp\OliverK\pomppupeli\pomppupeli\pomppupeli\bin\x86\Debug\Content\kentta1.xnb</Output> 38 <Time>2016-06-1 6T14:33:24.4675539+03:00</Time>38 <Time>2016-06-17T09:50:06.5153345+03:00</Time> 39 39 </Item> 40 40 <Item> … … 110 110 <Time>2016-06-16T10:32:44.3469004+03:00</Time> 111 111 </Item> 112 <Item> 113 <Source>tyyppi.png</Source> 114 <Name>tyyppi</Name> 115 <Importer>TextureImporter</Importer> 116 <Processor>TextureProcessor</Processor> 117 <Options>None</Options> 118 <Output>C:\MyTemp\OliverK\pomppupeli\pomppupeli\pomppupeli\bin\x86\Debug\Content\tyyppi.xnb</Output> 119 <Time>2016-06-17T09:58:05.8214005+03:00</Time> 120 </Item> 112 121 <BuildSuccessful>true</BuildSuccessful> 113 122 <Settings> -
2016/24/OliverK/pomppupeli/pomppupeli/pomppupeli/obj/x86/Debug/cachefile-{FB1067CC-FEED-45F1-8CB8-8F3DD59AB260}-targetpath.txt
r7391 r7426 11 11 Content\images.xnb 12 12 Content\nyan cat.xnb 13 Content\tyyppi.xnb -
2016/24/OliverK/pomppupeli/pomppupeli/pomppupeli/obj/x86/Debug/pomppupeli.csproj.FileListAbsolute.txt
r7391 r7426 19 19 C:\MyTemp\OliverK\pomppupeli\pomppupeli\pomppupeli\bin\x86\Debug\Content\images.xnb 20 20 C:\MyTemp\OliverK\pomppupeli\pomppupeli\pomppupeli\bin\x86\Debug\Content\nyan cat.xnb 21 C:\MyTemp\OliverK\pomppupeli\pomppupeli\pomppupeli\bin\x86\Debug\Content\tyyppi.xnb -
2016/24/OliverK/pomppupeli/pomppupeli/pomppupeli/pomppupeli.cs
r7391 r7426 14 14 15 15 PlatformCharacter pelaaja1; 16 PlatformCharacter pelaaja2; 17 16 18 17 19 Image palikkakuva = LoadImage("images"); 18 Image ukkonKuva = LoadImage(" ukko");20 Image ukkonKuva = LoadImage("tyyppi"); 19 21 Image pelaajanKuva = LoadImage("ukko2"); 20 22 Image dl2Kuva = LoadImage("DL2"); … … 27 29 28 30 29 PhysicsObject ukko2; 30 31 public double Velocity { get; private set; } 32 31 32 33 33 34 34 public override void Begin() 35 35 { 36 36 ClearAll(); 37 37 38 38 Gravity = new Vector(0, -1000); … … 56 56 kentta.SetTileMethod('N', LisaaPelaaja); 57 57 kentta.SetTileMethod('#', lisaaPalikka); 58 kentta.SetTileMethod('M', lisaaPelaaja2); 58 59 kentta.Execute(RUUDUN_KOKO, RUUDUN_KOKO); 59 60 Level.CreateBorders(); … … 106 107 AddCollisionHandler(pelaaja1, "DL2", TormaaTahteen); 107 108 Add(pelaaja1); 108 } 109 110 void LisaaNappaimet() 109 110 //Ase 111 AssaultRifle ase = new AssaultRifle(30, 20); 112 pelaaja1.Weapon = ase; 113 ase.IsVisible = false; 114 115 //Mitä tapahtuu kun ammus osuu johonkin? 116 ase.ProjectileCollision = AmmusOsui; 117 118 Keyboard.Listen(Key.Space, ButtonState.Down, AmmuAseella, "Ammu", pelaaja1); 119 ControllerOne.Listen(Button.X, ButtonState.Pressed, AmmuAseella, "Ammu", pelaaja1); 120 121 pelaaja1.Add(ase); 122 123 // 124 } 125 void AmmuAseella(PlatformCharacter pelaaja) 126 { 127 PhysicsObject ammus = pelaaja.Weapon.Shoot(); 128 129 if (ammus != null) 130 { 131 //ammus.Size *= 3; 132 //ammus.Image = ... 133 //ammus.MaximumLifetime = TimeSpan.FromSeconds(2.0); 134 } 135 } 136 137 void AmmusOsui(PhysicsObject ammus, PhysicsObject kohde) 138 { 139 ammus.Destroy(); 140 Begin(); 141 142 } 143 144 void lisaaPelaaja2(Vector paikka, double leveys, double korkeus) 145 { 146 pelaaja2 = new PlatformCharacter(leveys, korkeus); 147 pelaaja2.Position = paikka; 148 pelaaja2.Mass = 4.0; 149 pelaaja2.Image = ukkonKuva; 150 AddCollisionHandler(pelaaja2, "DL2", TormaaTahteen); 151 Add(pelaaja2); 152 153 //Ase 154 AssaultRifle pelaajan2Ase = new AssaultRifle(30,20); 155 pelaaja2.Weapon = pelaajan2Ase; 156 pelaajan2Ase.IsVisible = false; 157 158 Keyboard.Listen(Key.S, ButtonState.Down, AmmuAseella, "Ammu", pelaaja2); 159 ControllerTwo.Listen(Button.X, ButtonState.Pressed, AmmuAseella, "Ammu", pelaaja2); 160 161 //Ammusten määrä aluksi: 162 pelaajan2Ase.Ammo.Value = 1000; 163 164 //Mitä tapahtuu kun ammus osuu johonkin? 165 pelaajan2Ase.ProjectileCollision = AmmusOsui; 166 167 pelaaja1.Add(pelaajan2Ase); 168 169 // 170 } 171 172 173 void LisaaNappaimet() 111 174 { 112 175 Keyboard.Listen(Key.F1, ButtonState.Pressed, ShowControlHelp, "Näytä ohjeet"); … … 117 180 Keyboard.Listen(Key.Up, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 118 181 182 183 119 184 ControllerOne.Listen(Button.Back, ButtonState.Pressed, Exit, "Poistu pelistä"); 120 185 … … 122 187 ControllerOne.Listen(Button.DPadRight, ButtonState.Down, Liikuta, "Pelaaja liikkuu oikealle", pelaaja1, nopeus); 123 188 ControllerOne.Listen(Button.A, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja1, hyppyNopeus); 189 190 Keyboard.Listen(Key.A, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja2, -nopeus); 191 Keyboard.Listen(Key.D, ButtonState.Down, Liikuta, "Liikkuu vasemmalle", pelaaja2, nopeus); 192 Keyboard.Listen(Key.W, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja2, hyppyNopeus); 193 194 ControllerTwo.Listen(Button.DPadLeft, ButtonState.Down, Liikuta, "Pelaaja liikkuu vasemmalle", pelaaja2, -nopeus); 195 ControllerTwo.Listen(Button.DPadRight, ButtonState.Down, Liikuta, "Pelaaja liikkuu oikealle", pelaaja2, nopeus); 196 ControllerTwo.Listen(Button.A, ButtonState.Pressed, Hyppaa, "Pelaaja hyppää", pelaaja2, hyppyNopeus); 197 124 198 125 199 -
2016/24/OliverK/pomppupeli/pomppupeli/pomppupeli/pomppupeli.csproj.Debug.cachefile
r7391 r7426 11 11 Content\images.xnb 12 12 Content\nyan cat.xnb 13 Content\tyyppi.xnb -
2016/24/OliverK/pomppupeli/pomppupeli/pomppupeliContent/kentta1.txt
r7391 r7426 21 21 f ## ## ## ## ## ## h 22 22 f j 23 n Ny23 nN My 24 24 ############################ -
2016/24/OliverK/pomppupeli/pomppupeli/pomppupeliContent/pomppupeliContent.contentproj
r7391 r7426 121 121 </Compile> 122 122 </ItemGroup> 123 <ItemGroup> 124 <Compile Include="tyyppi.png"> 125 <Name>tyyppi</Name> 126 <Importer>TextureImporter</Importer> 127 <Processor>TextureProcessor</Processor> 128 </Compile> 129 </ItemGroup> 123 130 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 124 131 <!-- 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.