TGB/Behaviors/Count On Death

From TDN


Count On Death
Description:

When the object this behavior is attached to dies. This behavior finds the object specified and searches for a "counter" behavior on it. If it finds this counter behavior, it calls that counter's "ModifyCount" method to change the current value of the count.

Example usage might be where you have a "Score" text object, with a counter behavior. When you add an enemy, you give it a count on death behavior with the value set to the score given for shooting that object. When the object dies, it adds to the counter for score!


 Download: Count On Death

Download the zip file and drag it onto the TGB window to add it to your project.



Back to Behavior Listing