Exemplo n.º 1
0
void Level::makeTurn(float dt)
{
    if (_playerCreature != nullptr)
    {
        _playerCreature->onTurn(dt);
        _soundEnvironment->getMicrophone()->setCoordinate(_playerCreature->getCoordinate());
    }
    
    for (size_t i = 0; i < _creatures.size(); )
    {
        auto creature = _creatures.at(i);
        if (creature != _playerCreature)
        {
            creature->onTurn(dt);
        }

        if (creature->isDead())
        {
            removeCreature(creature);
        }
        else
        {
            i++;
        }
    }

    _soundEnvironment->update(dt);
}
Exemplo n.º 2
0
void SectionCreature::slot_delCreature()
{
	if( DataTheme.creatures.getRace( _race )->count() > 1 ) {
		save();
		removeCreature();
		init();
	}	
}