Mobs in Pirates of Voxel Play are prefabs which contains a skinned animation plus a series of script that handles its lifecycle.


All mobs can be found in Game/Scripts/Mobs folder:




The NetworkCannibal script shown above derives from the NetworkMob base class and controls the movement and behaviour of this cannibal (for example, this script checks if player is in line of sight and switch its state to engaging the player and attack him, etc.)


You can customize the mob properties like Max Health, Score by Kill (score granted to the player when this cannibal is killed), Score by Hit (score granted per hit), the loot (items dropped when cannibal dies), the screen name and some other properties like which melee weapons can use or the sound effects.