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

项目:touhou-java    文件:ParticleEditor.java   
public void create () {
    if (spriteBatch != null) return;

    Texture.setEnforcePotImages(false);

    spriteBatch = new SpriteBatch();

    worldCamera = new OrthographicCamera();
    textCamera = new OrthographicCamera();

    pixelsPerMeter = new NumericValue();
    pixelsPerMeter.setValue(1.0f);
    pixelsPerMeter.setAlwaysActive(true);

    zoomLevel = new NumericValue();
    zoomLevel.setValue(1.0f);
    zoomLevel.setAlwaysActive(true);

    font = new BitmapFont(Gdx.files.getFileHandle("default.fnt", FileType.Internal), Gdx.files.getFileHandle("default.png",
        FileType.Internal), true);
    effectPanel.newEmitter("Untitled", true);
    // if (resources.openFile("/editor-bg.png") != null) bgImage = new Image(gl, "/editor-bg.png");
    Gdx.input.setInputProcessor(this);
}
项目:libgdxcn    文件:NumericPanel.java   
public NumericPanel (final NumericValue value, String name, String description) {
    super(value, name, description);
    this.value = value;

    initializeComponents();

    valueSpinner.setValue(value.getValue());

    valueSpinner.addChangeListener(new ChangeListener() {
        public void stateChanged (ChangeEvent event) {
            value.setValue((Float)valueSpinner.getValue());
        }
    });
}
项目:libgdxcn    文件:ParticleEditor.java   
public void create () {
    if (spriteBatch != null) return;

    spriteBatch = new SpriteBatch();

    worldCamera = new OrthographicCamera();
    textCamera = new OrthographicCamera();

    pixelsPerMeter = new NumericValue();
    pixelsPerMeter.setValue(1.0f);
    pixelsPerMeter.setAlwaysActive(true);

    zoomLevel = new NumericValue();
    zoomLevel.setValue(1.0f);
    zoomLevel.setAlwaysActive(true);

    deltaMultiplier = new NumericValue();
    deltaMultiplier.setValue(1.0f);
    deltaMultiplier.setAlwaysActive(true);

    backgroundColor = new GradientColorValue();
    backgroundColor.setColors(new float[] { 0f, 0f, 0f});

    font = new BitmapFont(Gdx.files.getFileHandle("default.fnt", FileType.Internal), Gdx.files.getFileHandle("default.png",
        FileType.Internal), true);
    effectPanel.newExampleEmitter("Untitled", true);
    // if (resources.openFile("/editor-bg.png") != null) bgImage = new Image(gl, "/editor-bg.png");
    Gdx.input.setInputProcessor(this);
}
项目:GdxStudio    文件:NumericPanel.java   
public NumericPanel (final NumericValue value, String name, String description) {
    super(value, name, description);
    this.value = value;

    initializeComponents();

    valueSpinner.setValue(value.getValue());

    valueSpinner.addChangeListener(new ChangeListener() {
        public void stateChanged (ChangeEvent event) {
            value.setValue((Float)valueSpinner.getValue());
        }
    });
}
项目:GdxStudio    文件:ParticleRenderer.java   
@Override
public void create () {
    if (spriteBatch != null) return;

    Texture.setEnforcePotImages(false);

    spriteBatch = new SpriteBatch();

    this.particlePanel.worldCamera = new OrthographicCamera();
    this.particlePanel.textCamera = new OrthographicCamera();

    this.particlePanel.pixelsPerMeter = new NumericValue();
    this.particlePanel.pixelsPerMeter.setValue(1.0f);
    this.particlePanel.pixelsPerMeter.setAlwaysActive(true);

    this.particlePanel.zoomLevel = new NumericValue();
    this.particlePanel.zoomLevel.setValue(1.0f);
    this.particlePanel.zoomLevel.setAlwaysActive(true);

    this.particlePanel.deltaMultiplier = new NumericValue();
    this.particlePanel.deltaMultiplier.setValue(1.0f);
    this.particlePanel.deltaMultiplier.setAlwaysActive(true);

    font = new BitmapFont(Gdx.files.getFileHandle("default.fnt", FileType.Internal), Gdx.files.getFileHandle("default.png",
        FileType.Internal), true);
    this.particlePanel.effectPanel.newExampleEmitter("Untitled", true);
    // if (resources.openFile("/editor-bg.png") != null) bgImage = new Image(gl, "/editor-bg.png");
    //Gdx.input.setInputProcessor(this);
}
项目:touhou-java    文件:NumericPanel.java   
public NumericPanel (final NumericValue value, String name, String description) {
    super(value, name, description);
    this.value = value;

    initializeComponents();

    valueSpinner.setValue(value.getValue());

    valueSpinner.addChangeListener(new ChangeListener() {
        public void stateChanged (ChangeEvent event) {
            value.setValue((Float)valueSpinner.getValue());
        }
    });
}