v1.2.1: improved the surprise and wound visuals
This commit is contained in:
@@ -31,7 +31,7 @@ import com.watabou.noosa.Visual;
|
|||||||
|
|
||||||
public class Surprise extends Image {
|
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;
|
private float time;
|
||||||
|
|
||||||
@@ -65,8 +65,9 @@ public class Surprise extends Image {
|
|||||||
kill();
|
kill();
|
||||||
} else {
|
} else {
|
||||||
float p = time / TIME_TO_FADE;
|
float p = time / TIME_TO_FADE;
|
||||||
alpha(p);
|
alpha((float) Math.sqrt(p));
|
||||||
scale.y = 1 + p/2;
|
scale.y = 1f + p;
|
||||||
|
scale.x = 1f + p/4f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import com.watabou.noosa.Visual;
|
|||||||
|
|
||||||
public class Wound extends Image {
|
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;
|
private float time;
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ public class Wound extends Image {
|
|||||||
kill();
|
kill();
|
||||||
} else {
|
} else {
|
||||||
float p = time / TIME_TO_FADE;
|
float p = time / TIME_TO_FADE;
|
||||||
alpha( p );
|
alpha((float) Math.sqrt(p));
|
||||||
scale.x = 1 + p;
|
scale.x = 1 + p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user