Java 类com.badlogic.gdx.graphics.g2d.ParticleEmitter.ScaledNumericValue 实例源码

项目:craft    文件:ParticleRenderer.java   
@Override
public void setAlpha(float alpha) {

  // TODO: Alpha doesn't work for particles here as intended :(

  this.alpha = alpha;

  for (ParticleEffect e : effects.keySet()) {

    for (ParticleEmitter emitter : e.getEmitters()) {
      ScaledNumericValue v = emitter.getTransparency();
      v.setHigh(alpha);
      v.setLow(alpha);
    }
  }
}
项目:libgdxcn    文件:PercentagePanel.java   
public PercentagePanel (final ScaledNumericValue value, String chartTitle, String name, String description) {
    super(value, name, description);
    this.value = value;

    initializeComponents(chartTitle);

    chart.setValues(value.getTimeline(), value.getScaling());

    expandButton.addActionListener(new ActionListener() {
        public void actionPerformed (ActionEvent event) {
            chart.setExpanded(!chart.isExpanded());
            boolean expanded = chart.isExpanded();
            GridBagLayout layout = (GridBagLayout)getContentPanel().getLayout();
            GridBagConstraints chartConstraints = layout.getConstraints(chart);
            GridBagConstraints expandButtonConstraints = layout.getConstraints(expandButton);
            if (expanded) {
                chart.setPreferredSize(new Dimension(150, 200));
                expandButton.setText("-");
                chartConstraints.weightx = 1;
                expandButtonConstraints.weightx = 0;
            } else {
                chart.setPreferredSize(new Dimension(150, 62));
                expandButton.setText("+");
                chartConstraints.weightx = 0;
                expandButtonConstraints.weightx = 1;
            }
            layout.setConstraints(chart, chartConstraints);
            layout.setConstraints(expandButton, expandButtonConstraints);
            chart.revalidate();
        }
    });
}
项目:GdxStudio    文件:PercentagePanel.java   
public PercentagePanel (final ScaledNumericValue value, String chartTitle, String name, String description) {
    super(value, name, description);
    this.value = value;

    initializeComponents(chartTitle);

    chart.setValues(value.getTimeline(), value.getScaling());

    expandButton.addActionListener(new ActionListener() {
        public void actionPerformed (ActionEvent event) {
            chart.setExpanded(!chart.isExpanded());
            boolean expanded = chart.isExpanded();
            GridBagLayout layout = (GridBagLayout)getContentPanel().getLayout();
            GridBagConstraints chartConstraints = layout.getConstraints(chart);
            GridBagConstraints expandButtonConstraints = layout.getConstraints(expandButton);
            if (expanded) {
                chart.setPreferredSize(new Dimension(150, 200));
                expandButton.setText("-");
                chartConstraints.weightx = 1;
                expandButtonConstraints.weightx = 0;
            } else {
                chart.setPreferredSize(new Dimension(150, 62));
                expandButton.setText("+");
                chartConstraints.weightx = 0;
                expandButtonConstraints.weightx = 1;
            }
            layout.setConstraints(chart, chartConstraints);
            layout.setConstraints(expandButton, expandButtonConstraints);
            chart.revalidate();
        }
    });
}
项目:touhou-java    文件:PercentagePanel.java   
public PercentagePanel (final ScaledNumericValue value, String chartTitle, String name, String description) {
    super(value, name, description);
    this.value = value;

    initializeComponents(chartTitle);

    chart.setValues(value.getTimeline(), value.getScaling());

    expandButton.addActionListener(new ActionListener() {
        public void actionPerformed (ActionEvent event) {
            chart.setExpanded(!chart.isExpanded());
            boolean expanded = chart.isExpanded();
            GridBagLayout layout = (GridBagLayout)getContentPanel().getLayout();
            GridBagConstraints chartConstraints = layout.getConstraints(chart);
            GridBagConstraints expandButtonConstraints = layout.getConstraints(expandButton);
            if (expanded) {
                chart.setPreferredSize(new Dimension(150, 200));
                expandButton.setText("-");
                chartConstraints.weightx = 1;
                expandButtonConstraints.weightx = 0;
            } else {
                chart.setPreferredSize(new Dimension(150, 62));
                expandButton.setText("+");
                chartConstraints.weightx = 0;
                expandButtonConstraints.weightx = 1;
            }
            layout.setConstraints(chart, chartConstraints);
            layout.setConstraints(expandButton, expandButtonConstraints);
            chart.revalidate();
        }
    });
}
项目:fabulae    文件:WeatherParticleEmitter.java   
public ScaledNumericValue getXScale () {
    return xScaleValue;
}
项目:fabulae    文件:WeatherParticleEmitter.java   
public ScaledNumericValue getYScale () {
    return yScaleValue;
}
项目:fabulae    文件:WeatherParticleEmitter.java   
public ScaledNumericValue getVelocity () {
    return velocityValue;
}
项目:fabulae    文件:WeatherParticleEmitter.java   
public ScaledNumericValue getEmission () {
    return emissionValue;
}
项目:fabulae    文件:WeatherParticleEmitter.java   
public ScaledNumericValue getSpawnWidth () {
    return spawnWidthValue;
}
项目:fabulae    文件:WeatherParticleEmitter.java   
public ScaledNumericValue getSpawnHeight () {
    return spawnHeightValue;
}
项目:JavaLib    文件:ParticleEffect.java   
@Override
public void setRotation(float degrees) {
    ScaledNumericValue v = particleEffect.getEmitters().first().getAngle();
    v.setHigh(degrees + 90f, degrees -90f);
    v.setLow(degrees);
}