The typical enemy will have the following characteristics:
Based on these characteristics, we will define the following properties for an enemy in our game:
Health
Armor
Magic resistance
Speed
Damage
Reward
Let's now take a look at an excerpt from the enemy_data.xml
file to see how we define the XML structure for the enemy data:
<EnemyDataList> <EnemyData animation="enemy_1" health="20" armor="0" magic_resistance="0" speed="0.8" damage="1" reward="10" /> . . . </EnemyDataList>
The root element of the document titled EnemyDataList
defines a list of EnemyData
tags, one for each type of enemy. The only property that we didn't discuss earlier is the one titled animation
. This is nothing but the name of...