v1.2.1: improved the surprise and wound visuals

This commit is contained in:
Evan Debenham
2022-03-31 01:25:00 -04:00
parent b3abb5f805
commit 172781f75f
2 changed files with 6 additions and 5 deletions

View File

@@ -31,7 +31,7 @@ import com.watabou.noosa.Visual;
public class Surprise extends Image {
private static final float TIME_TO_FADE = 0.8f;
private static final float TIME_TO_FADE = 1f;
private float time;
@@ -65,8 +65,9 @@ public class Surprise extends Image {
kill();
} else {
float p = time / TIME_TO_FADE;
alpha(p);
scale.y = 1 + p/2;
alpha((float) Math.sqrt(p));
scale.y = 1f + p;
scale.x = 1f + p/4f;
}
}

View File

@@ -31,7 +31,7 @@ import com.watabou.noosa.Visual;
public class Wound extends Image {
private static final float TIME_TO_FADE = 0.8f;
private static final float TIME_TO_FADE = 1f;
private float time;
@@ -66,7 +66,7 @@ public class Wound extends Image {
kill();
} else {
float p = time / TIME_TO_FADE;
alpha( p );
alpha((float) Math.sqrt(p));
scale.x = 1 + p;
}
}