Exemplo n.º 1
0
void ShowTargetNamesImport( EntityCreator& self, bool value ){
	const bool oldvalue = self.getShowTargetNames();
	self.setShowTargetNames( value );
	if( oldvalue != value ){
		PreferencesDialog_restartRequired( "Entity Names = Targetnames" );
	}
}
Exemplo n.º 2
0
int mainML() {

    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    MotionControlSystem motionControlSystem;
    EntityManager entityManager(new FamilyManager());
    EntityCreator entityCreator;

    //Starship erstellen
    entityManager.addEntity(entityCreator.createStarship());

    //Darzustellende Objekte registrieren


    while (window.isOpen())
    {
        sf::Event event1;
        while(window.pollEvent(event1))
        {
            if(event1.type == sf::Event::KeyPressed) {
                motionControlSystem.update();
            }
        }
    }

    return 0;
}
Exemplo n.º 3
0
static NodeSmartReference Entity_create (EntityCreator& entityTable, EntityClass* entityClass, const KeyValues& keyValues)
{
	scene::Node& entity(entityTable.createEntity(entityClass));
	for (KeyValues::const_iterator i = keyValues.begin(); i != keyValues.end(); ++i) {
		Node_getEntity(entity)->setKeyValue((*i).first, (*i).second);
	}
	return NodeSmartReference(entity);
}
Exemplo n.º 4
0
void LightRadiiExport(EntityCreator& self, const BoolImportCallback& importer)
{
  importer(self.getLightRadii());
}
Exemplo n.º 5
0
void LightRadiiImport(EntityCreator& self, bool value)
{
  self.setLightRadii(value);
}
Exemplo n.º 6
0
	static void Export(const EntityCreator &self, const Callback<void(bool)> &returnz) {
		returnz(self.getLightRadii());
	}
Exemplo n.º 7
0
void ShowTargetNamesExport( EntityCreator& self, const BoolImportCallback& importer ){
	importer( self.getShowTargetNames() );
}
Exemplo n.º 8
0
void ShowNamesRatioExport( EntityCreator& self, const IntImportCallback& importer ){
	importer( self.getShowNamesRatio() );
}
Exemplo n.º 9
0
void ShowNamesRatioImport( EntityCreator& self, int value ){
	self.setShowNamesRatio( value );
	UpdateAllWindows();
}