示例#1
0
void LayerForceWidget::OnValueChanged()
{
	if (blockSignals)
		return;
	
	PropLineWrapper<Vector3> propForce;
	forceTimeLine->GetValues(propForce.GetPropsPtr());
	PropLineWrapper<float32> propForceOverLife;
	forceOverLifeTimeLine->GetValue(0, propForceOverLife.GetPropsPtr());

	CommandUpdateParticleForce* updateForceCmd = new CommandUpdateParticleForce(layer, forceIndex);
	updateForceCmd->Init(propForce.GetPropLine(),						 
						 propForceOverLife.GetPropLine());
	
	DVASSERT(activeScene);
	activeScene->Exec(updateForceCmd);

	Init(activeScene, layer, forceIndex, false);
	emit ValueChanged();
}
示例#2
0
void LayerForceWidget::OnValueChanged()
{
    if (blockSignals)
        return;

    PropLineWrapper<Vector3> propForce;
    forceTimeLine->GetValues(propForce.GetPropsPtr());
    PropLineWrapper<Vector3> propForceVariable;
    forceVariationTimeLine->GetValues(propForceVariable.GetPropsPtr());
    PropLineWrapper<float32> propForceOverLife;
    forceOverLifeTimeLine->GetValue(0, propForceOverLife.GetPropsPtr());

    CommandUpdateParticleForce* updateForceCmd = new CommandUpdateParticleForce(layer, forceIndex);
    updateForceCmd->Init(propForce.GetPropLine(),
                         propForceVariable.GetPropLine(),
                         propForceOverLife.GetPropLine());

    CommandsManager::Instance()->ExecuteAndRelease(updateForceCmd,
            SceneDataManager::Instance()->SceneGetActive()->GetScene());

    Init(emitter, layer, forceIndex, false);
    emit ValueChanged();
}