Changeset 6708 for 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/LevelCreation.cs
- Timestamp:
- 2015-07-01 21:47:22 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/LevelCreation.cs
r6707 r6708 279 279 Add(exit); 280 280 exits.Add(exit); 281 282 bool create = properties.ContainsKey("block"); 283 if(create) 284 { 285 PhysicsObject fence = PhysicsObject.CreateStaticObject(TILE_SIZE, TILE_SIZE); 286 fence.Image = FenceImage; 287 fence.Position = exit.Position - new Vector(0, TILE_SIZE); 288 Add(fence, 3); 289 290 AddCollisionHandler(fence, "playerattack", delegate(PhysicsObject destroyable, PhysicsObject a) 291 { 292 destroyable.Destroy(); 293 }); 294 295 } 281 296 } 282 297 }
Note: See TracChangeset
for help on using the changeset viewer.