Interbehaviors means the communications between behaviors and/or one bahavior changing another behavior's values (Stencyl named them attributes) important for all games. Uses indludes:
1. close buttons
2. When player hit an enemy, the enemy gets stunned.
There are 2 wys to do so.
1. traditional method. (pink Behaviors tab in design mode)
1. traditional method. (pink Behaviors tab in design mode)
advantages: useful when many actors in scene.
disadvantages: more resource consuming as they use try {}
For example player behavior uses game attributes as stats and health conditions. When an enemy hits player, a game attribute is reduced. and player debuff is assigned via game attributes.
advantages: less lag when enemy dealing with player. without using try{}
disadvantges: extra steps needed to record enemy data via public static vars or game attributes in Array<Dynamic> form
No comments:
Post a Comment