Changeset 1440
- Timestamp:
- 2010-07-30 12:28:42 (13 years ago)
- Location:
- 2010/27/Aajokahe
- Files:
-
- 6 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2010/27/Aajokahe/Nurinams adventure/Content/Content.contentproj
r1406 r1440 106 106 </Compile> 107 107 </ItemGroup> 108 <ItemGroup> 109 <Compile Include="Nurinam3.png"> 110 <Name>Nurinam3</Name> 111 <Importer>TextureImporter</Importer> 112 <Processor>TextureProcessor</Processor> 113 </Compile> 114 </ItemGroup> 115 <ItemGroup> 116 <Compile Include="Enemy2.png"> 117 <Name>Enemy2</Name> 118 <Importer>TextureImporter</Importer> 119 <Processor>TextureProcessor</Processor> 120 </Compile> 121 </ItemGroup> 122 <ItemGroup> 123 <Compile Include="hideout.png"> 124 <Name>hideout</Name> 125 <Importer>TextureImporter</Importer> 126 <Processor>TextureProcessor</Processor> 127 </Compile> 128 </ItemGroup> 108 129 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 109 130 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
2010/27/Aajokahe/Nurinams adventure/Peli.cs
r1406 r1440 49 49 { 50 50 Timer ajastin = new Timer(); 51 ajastin.Interval = 5.5;51 ajastin.Interval = 6.0; 52 52 ajastin.Trigger += lisaaVihollisia; 53 53 Add(ajastin); … … 81 81 void lisaaPelaajat() 82 82 { 83 pelaaja1 = new PlatformCharacter (4 0, 40);83 pelaaja1 = new PlatformCharacter (45, 45); 84 84 pelaaja1.Mass = 4.0; 85 pelaaja1.Image = LoadImage("Nurinam 2");85 pelaaja1.Image = LoadImage("Nurinam3"); 86 86 pelaaja1.X = -400; 87 87 pelaaja1.Y = -10; 88 88 AddCollisionHandler(pelaaja1 , KasittelePelaaja1Tormays); 89 pelaaja1.Weapon = new AssaultRifle (0.1, 0.1); 89 AssaultRifle Ninjaase = new AssaultRifle (0.1, 0.1); 90 Ninjaase.Ammo.Value = 8; 91 pelaaja1.Weapon = Ninjaase; 92 90 93 91 94 Add(pelaaja1); … … 104 107 Keyboard.Listen(Key.Right, ButtonState.Down, liikuta, "Liikkuu oikealle", pelaaja1, nopeus); 105 108 Keyboard.Listen(Key.Up, ButtonState.Pressed, hyppaa, "Hyppää", pelaaja1, hyppyVoima); 106 Keyboard.Listen(Key. C, ButtonState.Down, AmmuAseella, "Ammu");109 Keyboard.Listen(Key.Space, ButtonState.Down, AmmuAseella, "Ammu"); 107 110 108 111 … … 126 129 PlatformCharacter LuoVihollinen() 127 130 { 128 PlatformCharacter vihollinen = new PlatformCharacter(4 0, 40);131 PlatformCharacter vihollinen = new PlatformCharacter(45, 45); 129 132 vihollinen.Shape = Shapes.Circle; 130 vihollinen.Image = LoadImage("Enemy ");133 vihollinen.Image = LoadImage("Enemy2"); 131 134 vihollinen.Mass = 10.0; 132 135 Add(vihollinen); 133 vihollinen.Y = -3 00;136 vihollinen.Y = -350; 134 137 vihollinen. X= +450; 135 138 vihollinen.Tag = "vihollinen"; 136 139 AddCollisionHandler(vihollinen, KasitteleVihollisenTormays); 137 140 138 AssaultRifle pyssy = new AssaultRifle(50, 10);141 AssaultRifle pyssy = new AssaultRifle (50, 10); 139 142 pyssy.Image = LoadImage ("Ak-47"); 143 140 144 vihollinen.Weapon = pyssy ; 141 145 … … 183 187 pisteLaskuri.Value += 1; 184 188 pisteLaskuri.Value = pisteLaskuri.Value + 1; 189 PlaySound("maali"); 190 185 191 } 186 192 if (kohde.Tag.ToString() == "vihollisammus") … … 265 271 void lisaaVihollisia(Timer sender) 266 272 { 273 if (sender.Interval > 1.0) 274 { 275 sender.Interval = sender.Interval - 0.1; 276 } 267 277 LuoVihollinen(); 268 278 } … … 275 285 Ninjatähti.Size = new Vector(10, 10); 276 286 Ninjatähti.Image = LoadImage("Ninja Star"); 277 287 AddCollisionHandler(Ninjatähti, KasitteleNinjatahdenTormays); 288 Ninjatähti.MaximumLifetime = TimeSpan.FromSeconds(5); 278 289 } 279 290
Note: See TracChangeset
for help on using the changeset viewer.