Ignore:
Timestamp:
2015-07-01 21:47:22 (6 years ago)
Author:
empaheik
Message:

Aita, jonka voi tuhota luodeilla, muttei miekalla. Hmm. Kyllä se tästä.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/LevelCreation.cs

    r6707 r6708  
    279279        Add(exit); 
    280280        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        } 
    281296    } 
    282297} 
Note: See TracChangeset for help on using the changeset viewer.