Exemplo n.º 1
0
 // Update is called once per frame
 void Update()
 {
     // Update age of the mob on every update
     _age += simulationTimestep;
     // Check if the mob is too old
     if (_age > getMaxAge())
     {
         OnDeath();
     }
     timeSinceLastMating += simulationTimestep;
     // Move the mob
     behaviour.Move();
 }