Animal Class

Inherits: LiveObject

Properties
animationDie cfg hungry name radius satietyMax sphereCenter sphereRadius thirst waterSatietyMax workerOwn

Functions
dropHouse getAnimations setHouse updateChildbearingTimer

.animationDie
Type: string [Read Only] Name of die animation

.cfg
Type: AnimalConfig [Read Only] Animal config. It contains various parameters for given kind of animals.

.hungry
Type: boolean [Read Only] If food satiety less than critical

.name
Type: string [Read Only] Returns name of animal (from config)

.radius
Type: number [Read Only] Returns collision radius of animal

.satietyMax
Type: number [Read Only] Max value of food satiety (from animal config)

.sphereCenter
Type: Vector2 [Read Only]

.sphereRadius
Type: number [Read Only]

.thirst
Type: boolean [Read Only] If water satiety less than critical

.waterSatietyMax
Type: number [Read Only] Max value of water satiety (from animal config)

.workerOwn
Type: Human Worker that owns animal

dropHouse
function dropHouse Reset living house for animal

getAnimations
function getAnimations(type string ) -> table Returns table with animation names of given type

setHouse
function setHouse(bld Building ) Set living house for animal

updateChildbearingTimer
function updateChildbearingTimer(dt number )