Changeset 8911
- Timestamp:
- 2017-07-05 11:25:37 (5 years ago)
- Location:
- 2016/koodauskerho/VilleH/Tasohyppelypeli/Tasohyppelypeli
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
2016/koodauskerho/VilleH/Tasohyppelypeli/Tasohyppelypeli/Tasohyppelypeli/ninjakissanhikileikit.cs
r8883 r8911 120 120 { 121 121 ammus.Destroy(); 122 if (kohde.Tag.Equals("jeff")) 123 { 124 (kohde as Vihu).ElamaLaskuri.AddValue(-1); 125 } 126 122 127 } 123 128 void osui(PhysicsObject pelaaja, PhysicsObject kohde) … … 316 321 void lisaavihollinen(Vector paikka, double leveys, double korkeus) 317 322 { 318 PlatformCharacter vihu = new PlatformCharacter(leveys*1.5, korkeus*1.5);323 Vihu vihu = new Vihu(leveys*1.5, korkeus*1.5); 319 324 vihu.Image = LoadImage("mynam jeff"); 320 325 vihu.Position = paikka; … … 345 350 346 351 } 352 353 354 347 355 } 356 class Vihu: PlatformCharacter 357 { 358 private IntMeter elamaLaskuri = new IntMeter(3, 0, 3); 359 public IntMeter ElamaLaskuri { get { return elamaLaskuri; } } 360 361 public Vihu(double leveys, double korkeus) 362 : base(leveys, korkeus) 363 { 364 elamaLaskuri.LowerLimit += delegate { this.Destroy(); }; 365 } 366 } -
2016/koodauskerho/VilleH/Tasohyppelypeli/Tasohyppelypeli/TasohyppelypeliContent/kentta1.txt
r8909 r8911 8 8 9 9 10 N .....................................#........#............#.......#:.....##########################################w.....................................################10 N......................................#........#............#.......#:.....##########################################.....................................################ 11 11 #####################.....#.............#........................................#.....................................#.....................................# 12 12 .....................#...........................................................#.....................................#....................................#
Note: See TracChangeset
for help on using the changeset viewer.