Ejemplo n.º 1
0
void PopStar::gotoStartLayer()
{
	getPopStarDataMgr().setScore(0);
	getPopStarDataMgr().setLevel(1);

	changeLayer( gameLayer, StartLayer::create() );
}
Ejemplo n.º 2
0
void PopStar::gotoNextLevel()
{
	int level = getPopStarDataMgr().getLevel() + 1;
	getPopStarDataMgr().setLevel(level);

	changeLayer( gameLayer, GameLevel::create() );
}
void NeuralNetwork::stopBuilding()
{
	lastLayerIndex=layerIndex;
	init=false;
	//lastLayer=currentLayer;
	//printf("LLI %d \n",lastLayerIndex);
	changeLayer();
	//printf("LI %d \n",layerIndex);
}
void NeuralNetwork::computeLayer()
{
	//printf("computing layer: %d  size =%d \n",layerIndex,layers.at(layerIndex).size());
	for(int i=0;i<(int)layers.at(layerIndex).size();i++){
		//printf("atENUM %d \n",layers.at(layerIndex).at(i)->function);
		layers.at(layerIndex).at(i)->compute();
	}

	if(layerIndex==lastLayerIndex){outputUndefined=false;}

	changeLayer();
}
void QgsLayerPropertiesWidget::layerTypeChanged()
{
  QgsSymbolLayerV2* layer = mLayer;
  if ( !layer )
    return;
  QString newLayerType = cboLayerType->itemData( cboLayerType->currentIndex() ).toString();
  if ( layer->layerType() == newLayerType )
    return;

  // get creation function for new layer from registry
  QgsSymbolLayerV2Registry* pReg = QgsSymbolLayerV2Registry::instance();
  QgsSymbolLayerV2AbstractMetadata* am = pReg->symbolLayerMetadata( newLayerType );
  if ( am == NULL ) // check whether the metadata is assigned
    return;

  // change layer to a new (with different type)
  QgsSymbolLayerV2* newLayer = am->createSymbolLayer( QgsStringMap() );
  if ( newLayer == NULL )
    return;

  updateSymbolLayerWidget( newLayer );
  emit changeLayer( newLayer );
}
Ejemplo n.º 6
0
void GameLevel::onTimeUp(float delta)
{
	changeLayer( this, PopStarLayer::create() );
}
Ejemplo n.º 7
0
void StartLayer::onClickMenu(CCObject* obj)
{
	changeLayer( this, GameLevel::create() );
}
Ejemplo n.º 8
0
void QgsLayerPropertiesWidget::reloadLayer()
{
  emit changeLayer( mLayer );
}