Add leaves particle concept
This commit is contained in:
parent
f7309d4f15
commit
50efed4b69
BIN
assets/Textures/animetree1leaves1.png
Normal file
BIN
assets/Textures/animetree1leaves1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 489 KiB |
@ -24,6 +24,7 @@ import electrosphere.entity.types.structure.StructureUtils;
|
||||
import electrosphere.game.collision.PhysicsUtils;
|
||||
import electrosphere.game.collision.collidable.Collidable;
|
||||
import electrosphere.game.server.ai.creature.MindlessAttacker;
|
||||
import electrosphere.game.server.effects.ParticleEffects;
|
||||
import electrosphere.game.server.terrain.models.TerrainModification;
|
||||
import electrosphere.game.server.town.Town;
|
||||
import electrosphere.game.server.world.datacell.DataCellManager;
|
||||
@ -561,6 +562,11 @@ public class LoadingThread extends Thread {
|
||||
|
||||
Entity fallOak = FoliageUtils.spawnBasicFoliage("FallOak1");
|
||||
EntityUtils.getPosition(fallOak).set(1,0,3);
|
||||
|
||||
Entity spark = ParticleUtils.spawnBillboardParticle("Textures/animetree1leaves1.png", 150000, new Vector3f(0,0,0), 0, 0);
|
||||
EntityUtils.getPosition(spark).set(new Vector3f(3,3,3));
|
||||
EntityUtils.getScale(spark).mul(1f);
|
||||
|
||||
// CollisionObjUtils.positionCharacter(fallOak, new Vector3f(1, 0, 3));
|
||||
//
|
||||
//
|
||||
|
||||
@ -49,6 +49,9 @@ public class FoliageUtils {
|
||||
break;
|
||||
case "BLENDER_ROTATION":
|
||||
ActorUtils.applyBlenderRotation(rVal);
|
||||
break;
|
||||
case "PARTICLE_SPAWNER":
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@ public class ParticleUtils {
|
||||
|
||||
|
||||
|
||||
public static Entity spawnParticle(String texture, int maxLife, Vector3f destination, float velocity, float acceleration){
|
||||
public static Entity spawnBillboardParticle(String texture, int maxLife, Vector3f destination, float velocity, float acceleration){
|
||||
Entity rVal = EntityUtils.spawnDrawableEntity(Globals.particleBillboardModel);
|
||||
EntityUtils.getActor(rVal).setTextureOverride(texture);
|
||||
Globals.assetManager.addTexturePathtoQueue(texture);
|
||||
|
||||
@ -20,7 +20,7 @@ public class ParticleEffects {
|
||||
Vector3f direction = new Vector3f(rand.nextFloat() - 0.5f,rand.nextFloat() - 0.5f,rand.nextFloat() - 0.5f).normalize();
|
||||
float velocity = rand.nextFloat() * 0.01f;
|
||||
float acceleration = 0.005f;
|
||||
Entity spark = ParticleUtils.spawnParticle("Textures/spark1.png", 15, direction, velocity, acceleration);
|
||||
Entity spark = ParticleUtils.spawnBillboardParticle("Textures/spark1.png", 15, direction, velocity, acceleration);
|
||||
EntityUtils.getPosition(spark).set(position);
|
||||
EntityUtils.getScale(spark).mul(0.03f);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user