- Timestamp:
- 2013-07-25 14:48:47 (9 years ago)
- Location:
- 2013/30/VilleF/Lentokone/Lentokone
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2013/30/VilleF/Lentokone/Lentokone/Lentokone/Lentokone.cs
r4659 r4667 18 18 Image maisema = LoadImage("havutausta"); 19 19 Image havusaurus = LoadImage("havusauruskuva"); 20 Image tykkikoira = LoadImage("tykkikoira"); 20 21 21 22 Vector nopeusYlos = new Vector(0, 1000); … … 131 132 RasasenTykki.Ammo.Value = 999; 132 133 RasasenTykki.ProjectileCollision = AmmusOsui; 134 135 133 136 134 137 Mouse.ListenMovement(0.1, Tahtaa, "Tähtää aseella"); … … 142 145 143 146 pommi = new PhysicsObject(50, 50); 144 //pommi.Shape = Shape.FromImage("pommik");147 pommi.Shape = Shape.FromImage(pommik); 145 148 pommi.Image = pommik; 146 149 pommi.Position = pelaaja.Position; … … 172 175 n++; 173 176 Timer ajastin = new Timer(); 174 ajastin.Interval = RandomGen.NextDouble(0.2, 2);177 ajastin.Interval = RandomGen.NextDouble(0.2, 1); 175 178 ajastin.Timeout += delegate 176 179 { 177 178 ukkeli1.Velocity = new Vector(RandomGen.SelectOne(-200, 200), 0); 180 ukkeli1.Velocity = new Vector(RandomGen.SelectOne(-200, 200, -500, 500), 0); 179 181 }; 180 182 ajastin.Start(); … … 190 192 pisteNaytto.Y = Screen.Top - 100; 191 193 pisteNaytto.TextColor = Color.Green; 192 //pisteNaytto.Color = Color.White;193 194 pisteNaytto.IntFormatString = "Pisteitä: {0:D1}"; 194 195 pisteNaytto.BindTo(pisteLaskuri); … … 204 205 komboNaytto.Y = Screen.Top - 200; 205 206 komboNaytto.TextColor = Color.Green; 206 //pisteNaytto.Color = Color.White;207 207 komboNaytto.IntFormatString = "COMBO: {0:D1}"; 208 208 komboNaytto.BindTo(KomboLaskuri); … … 225 225 if (KomboLaskuri.Value == 10) 226 226 { 227 Label tekstikentta = new Label(" Fatality");227 Label tekstikentta = new Label("Kissat on koiria"); 228 228 Add(tekstikentta); 229 // PommiOsuu(100); 230 231 } 232 233 if (KomboLaskuri.Value > 6) { } 234 235 229 } 230 if (KomboLaskuri.Value > 6) {} 236 231 } 237 232 … … 243 238 Raamattu.CollisionIgnoreGroup = Rasa.CollisionIgnoreGroup; 244 239 AddCollisionHandler(Raamattu, RaamattuOsuu); 245 Add(Raamattu); 246 240 Add(Raamattu); 247 241 } 248 242 … … 257 251 PhysicsObject ammus = RasasenTykki.Shoot(); 258 252 253 254 259 255 if (ammus != null) 260 256 { 257 ammus.Image = tykkikoira; 261 258 ammus.Size *= 6; 262 //ammus.Image = ... 263 //ammus.MaximumLifetime = TimeSpan.FromSeconds(2.0); 259 ammus.MaximumLifetime = TimeSpan.FromSeconds(2.0); 264 260 } 265 261 } … … 304 300 o.ShockwaveReachesObject += delegate(IPhysicsObject rKohde, Vector v) { if (rKohde.Tag.Equals("vihollinen")) rKohde.Destroy(); }; 305 301 //pisteet++;} 306 } 307 308 309 310 302 } 311 303 } 312 304 … … 340 332 //pisteet++;} 341 333 } 342 343 344 345 346 334 } 347 335 … … 364 352 { 365 353 pelaaja.Velocity = new Vector(pelaaja.Velocity.X * 0.95, pelaaja.Velocity.Y); 366 367 }368 369 void PelaajaTormasi(PhysicsObject tormaaja, PhysicsObject kohde)370 {371 372 354 } 373 355 -
2013/30/VilleF/Lentokone/Lentokone/LentokoneContent/LentokoneContent.contentproj
r4659 r4667 146 146 </Compile> 147 147 </ItemGroup> 148 <ItemGroup> 149 <Compile Include="tykkikoira.png"> 150 <Name>tykkikoira</Name> 151 <Importer>TextureImporter</Importer> 152 <Processor>TextureProcessor</Processor> 153 </Compile> 154 </ItemGroup> 148 155 <Import Project="$(MSBuildExtensionsPath)\Microsoft\XNA Game Studio\$(XnaFrameworkVersion)\Microsoft.Xna.GameStudio.ContentPipeline.targets" /> 149 156 <!-- 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.