Adding character stats
Before introducing property replication and implementing it in the project, our thief hero needs to be ready for such a big step: that’s why I’ll guide you through the creation of a set of statistics that will be plugged into the Character class.
The first thing to do is to define your character stats. In particular, you will need the following data:
- A walk and a sprint speed, to handle the different paces of your character during gameplay
- A damage multiplier to manage more powerful hits whenever the character levels up
- A level-up value to check whenever the character has reached the next level
- A stealth multiplier that will handle how much noise the character makes when walking or sprinting
You may have noticed that your character has no health – that is because this is a stealth game and players will have to move carefully through the dungeon. Once they are discovered, they won’t have the option of facing...