use of com.badlogic.gdx.graphics.g3d.particles.values.SpawnShapeValue in project libgdx by libgdx.
the class SpawnInfluencerPanel method setCurrentSpawnData.
private void setCurrentSpawnData(SpawnShapeValue spawnShapeValue) {
SpawnShapeValue local = null;
if (spawnShapeValue instanceof PointSpawnShapeValue)
local = pointSpawnShapeValue;
else if (spawnShapeValue instanceof LineSpawnShapeValue)
local = lineSpawnShapeValue;
else if (spawnShapeValue instanceof RectangleSpawnShapeValue)
local = rectangleSpawnShapeValue;
else if (spawnShapeValue instanceof EllipseSpawnShapeValue)
local = ellipseSpawnShapeValue;
else if (spawnShapeValue instanceof CylinderSpawnShapeValue)
local = cylinderSpawnShapeValue;
if (spawnShapeValue instanceof UnweightedMeshSpawnShapeValue)
local = meshSpawnShapeValue;
else if (spawnShapeValue instanceof WeightMeshSpawnShapeValue)
local = weightMeshSpawnShapeValue;
local.load(spawnShapeValue);
}
use of com.badlogic.gdx.graphics.g3d.particles.values.SpawnShapeValue in project libgdx by libgdx.
the class SpawnInfluencerPanel method onTemplateChecked.
@Override
public void onTemplateChecked(Model model, boolean isChecked) {
//Update the shapes
SpawnShapeValue shapeValue = null;
Mesh mesh = model.meshes.get(0);
weightMeshSpawnShapeValue.setMesh(mesh, model);
meshSpawnShapeValue.setMesh(mesh, model);
if (shapeCombo.getSelectedItem() == SPAWN_SHAPE_WEIGHT_MESH) {
SpawnInfluencer influencer = (SpawnInfluencer) editor.getEmitter().findInfluencer(SpawnInfluencer.class);
influencer.spawnShapeValue = weightMeshSpawnShapeValue;
} else if (shapeCombo.getSelectedItem() == SPAWN_SHAPE_MESH) {
SpawnInfluencer influencer = (SpawnInfluencer) editor.getEmitter().findInfluencer(SpawnInfluencer.class);
influencer.spawnShapeValue = meshSpawnShapeValue;
}
editor.restart();
}
Aggregations