Exemplo n.º 1
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();
}
Exemplo n.º 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());

    DVASSERT(activeScene);
    activeScene->Exec(updateForceCmd);

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