Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -194,10 +194,14 @@ public class BulletType extends Content implements Cloneable{
|
|||||||
public @Nullable UnitType spawnUnit;
|
public @Nullable UnitType spawnUnit;
|
||||||
/** Unit spawned when this bullet hits something or despawns due to it hitting the end of its lifetime. */
|
/** Unit spawned when this bullet hits something or despawns due to it hitting the end of its lifetime. */
|
||||||
public @Nullable UnitType despawnUnit;
|
public @Nullable UnitType despawnUnit;
|
||||||
|
/** The chance for despawn units to spawn. */
|
||||||
|
public float despawnUnitChance = 1;
|
||||||
/** Amount of units spawned when this bullet despawns. */
|
/** Amount of units spawned when this bullet despawns. */
|
||||||
public int despawnUnitCount = 1;
|
public int despawnUnitCount = 1;
|
||||||
/** Random offset distance from the original bullet despawn/hit coordinate. */
|
/** Random offset distance from the original bullet despawn/hit coordinate. */
|
||||||
public float despawnUnitRadius = 0.1f;
|
public float despawnUnitRadius = 0.1f;
|
||||||
|
/** If true, units spawned when this bullet despawns face away from the bullet instead of the same direction as the bullet. */
|
||||||
|
public boolean faceOutwards = false;
|
||||||
/** Extra visual parts for this bullet. */
|
/** Extra visual parts for this bullet. */
|
||||||
public Seq<DrawPart> parts = new Seq<>();
|
public Seq<DrawPart> parts = new Seq<>();
|
||||||
|
|
||||||
@@ -489,9 +493,11 @@ public class BulletType extends Content implements Cloneable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void createUnits(Bullet b, float x, float y){
|
public void createUnits(Bullet b, float x, float y){
|
||||||
if(despawnUnit != null){
|
if(despawnUnit != null && Mathf.chance(despawnUnitChance)){
|
||||||
for(int i = 0; i < despawnUnitCount; i++){
|
for(int i = 0; i < despawnUnitCount; i++){
|
||||||
despawnUnit.spawn(b.team, x + Mathf.range(despawnUnitRadius), y + Mathf.range(despawnUnitRadius));
|
Tmp.v1.rnd(Mathf.random(despawnUnitRadius));
|
||||||
|
var u = despawnUnit.spawn(b.team, x + Tmp.v1.x, y + Tmp.v1.y);
|
||||||
|
u.rotation = faceOutwards ? Tmp.v1.angle() : b.rotation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,7 +190,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ToxoFlame",
|
"name": "ToxoFlame",
|
||||||
"address": ["193.233.133.223", "193.233.133.223:6568"]
|
"address": ["193.233.133.223", "193.233.133.223:6568", "193.233.133.223:6569"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Meow Island",
|
"name": "Meow Island",
|
||||||
|
|||||||
Reference in New Issue
Block a user