2728293031323334353637
public Explosion(Vector3 pos) { Material m = new Material(); m.emissive = Color.YELLOW; model = ellipse(m, 1.0f, 1.0f, 20); addBehavior(new Billboard(model)); transform.position = pos; model.transform.scale = new Vector3(0.0f);
4041424344454647484950
} Material mtl = new Material(shader); model = ellipse(mtl, 2.0f, 2.0f, 20); addBehavior(new Billboard(model)); addBehavior(new Motion(vel, Vector3.zero())); addBehavior(new TimeToLive(2.0f)); addBehavior(new Behavior() { @Override