v0.3.5: fixed a bug with new seal speck particles
This commit is contained in:
parent
371bf9b58f
commit
b4d78ada9d
|
@ -62,6 +62,7 @@ public class Speck extends Image {
|
||||||
public static final int STENCH = 111;
|
public static final int STENCH = 111;
|
||||||
public static final int FORGE = 112;
|
public static final int FORGE = 112;
|
||||||
public static final int CONFUSION = 113;
|
public static final int CONFUSION = 113;
|
||||||
|
public static final int RED_LIGHT = 114;
|
||||||
|
|
||||||
private static final int SIZE = 7;
|
private static final int SIZE = 7;
|
||||||
|
|
||||||
|
@ -90,6 +91,7 @@ public class Speck extends Image {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case DISCOVER:
|
case DISCOVER:
|
||||||
|
case RED_LIGHT:
|
||||||
frame( film.get( LIGHT ) );
|
frame( film.get( LIGHT ) );
|
||||||
break;
|
break;
|
||||||
case EVOKE:
|
case EVOKE:
|
||||||
|
@ -169,7 +171,9 @@ public class Speck extends Image {
|
||||||
acc.set( -speed.x, 0 );
|
acc.set( -speed.x, 0 );
|
||||||
lifespan = 0.5f;
|
lifespan = 0.5f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case RED_LIGHT:
|
||||||
|
tint(0xFFCC0000);
|
||||||
case LIGHT:
|
case LIGHT:
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float( 360 );
|
||||||
angularSpeed = 90;
|
angularSpeed = 90;
|
||||||
|
@ -351,7 +355,8 @@ public class Speck extends Image {
|
||||||
case HEALING:
|
case HEALING:
|
||||||
am = p < 0.5f ? 1 : 2 - p * 2;
|
am = p < 0.5f ? 1 : 2 - p * 2;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case RED_LIGHT:
|
||||||
case LIGHT:
|
case LIGHT:
|
||||||
am = scale.set( p < 0.2f ? p * 5f : (1 - p) * 1.25f ).x;
|
am = scale.set( p < 0.2f ? p * 5f : (1 - p) * 1.25f ).x;
|
||||||
break;
|
break;
|
||||||
|
@ -437,18 +442,10 @@ public class Speck extends Image {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Emitter.Factory factory( final int type ) {
|
public static Emitter.Factory factory( final int type ) {
|
||||||
return factory( type, false, 0 );
|
return factory( type, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Emitter.Factory factory( final int type, final boolean lightMode ) {
|
public static Emitter.Factory factory( final int type, final boolean lightMode ) {
|
||||||
return factory( type, lightMode, 0 );
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Emitter.Factory factory( final int type, final int tint ) {
|
|
||||||
return factory( type, false, tint );
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Emitter.Factory factory( final int type, final boolean lightMode, final int tint ) {
|
|
||||||
|
|
||||||
Emitter.Factory factory = factories.get( type );
|
Emitter.Factory factory = factories.get( type );
|
||||||
|
|
||||||
|
@ -458,7 +455,6 @@ public class Speck extends Image {
|
||||||
public void emit ( Emitter emitter, int index, float x, float y ) {
|
public void emit ( Emitter emitter, int index, float x, float y ) {
|
||||||
Speck p = (Speck)emitter.recycle( Speck.class );
|
Speck p = (Speck)emitter.recycle( Speck.class );
|
||||||
p.reset( index, x, y, type );
|
p.reset( index, x, y, type );
|
||||||
if (tint != 0 ) p.tint( tint );
|
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public boolean lightMode() {
|
public boolean lightMode() {
|
||||||
|
|
|
@ -306,7 +306,7 @@ public class Armor extends EquipableItem {
|
||||||
Emitter emitter = new Emitter();
|
Emitter emitter = new Emitter();
|
||||||
emitter.pos(10f, 6f);
|
emitter.pos(10f, 6f);
|
||||||
emitter.fillTarget = false;
|
emitter.fillTarget = false;
|
||||||
emitter.pour(Speck.factory( Speck.LIGHT, 0xFFCC0000 ), 0.6f);
|
emitter.pour(Speck.factory( Speck.RED_LIGHT ), 0.6f);
|
||||||
return emitter;
|
return emitter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user