hawkthorne/hawkthorne-journey — pull request #2153 by niamu (2014-08-27 05:40:44+00:00)
Title: Burn Buildings

Here's a first draft for burning buildings. Specifically the blacksmith house.

The blacksmith building was stripped from the tmx level file and created as a new building node type with a burnt and non-burnt image state as a starting and end point.

When a building is burned, it attempts to burn the good image sprite row by row from top to bottom by adding fire to each quad before that quad is no longer drawn on screen and the fire removed from that quad. This continues until nothing but the burnt state of the building sprite remains.

The building node also searches for any doors in the level currently leading to a level by the same name and removes them so they are not accessible. For example: the door to the blacksmith house leads to a level called "blacksmith" and the building node is also called "blacksmith". This means that door is removed when the building burns so the player can not enter once it starts to burn.

-----

The remaining issue is the platform removal so the player can no longer walk on the roof of a building that has been burned. Once the building is associated with the platform we can also make sure that no fire spawns above the platform and fix the minor visual defect there.