December 2015
Beginner to intermediate
522 pages
11h 21m
English
Within the entity component system paradigm, every possible entity parameter or feature is represented as a component. Emitting sounds is definitely one of those features. In order for that to happen, we do have some setting up to do, starting with creating and implementing it in the C_SoundEmitter.h header. Before that, however, let's define the types of sounds an entity can have:
enum class EntitySound{ None = -1, Footstep, Attack, Hurt,Death };As you can see, we're only going to be working with four types of sound, one of which is going to be implemented in this chapter. A None value is also set up in order to make error checking easier.
Every sound that an entity can emit will most likely have different frames it ...
Read now
Unlock full access