v0.6.0: improved fade in an out effects on title scene
This commit is contained in:
parent
36cb666f0e
commit
e42697007b
|
@ -83,7 +83,8 @@ public class TitleScene extends PixelScene {
|
|||
@Override
|
||||
public void update() {
|
||||
super.update();
|
||||
am = (float)Math.sin( -(time += Game.elapsed) );
|
||||
am = Math.max(0f, (float)Math.sin( time += Game.elapsed ));
|
||||
if (time >= 1.5f*Math.PI) time = 0;
|
||||
}
|
||||
@Override
|
||||
public void draw() {
|
||||
|
|
|
@ -79,7 +79,8 @@ public class WelcomeScene extends PixelScene {
|
|||
@Override
|
||||
public void update() {
|
||||
super.update();
|
||||
am = (float)Math.sin( -(time += Game.elapsed) );
|
||||
am = Math.max(0f, (float)Math.sin( time += Game.elapsed ));
|
||||
if (time >= 1.5f*Math.PI) time = 0;
|
||||
}
|
||||
@Override
|
||||
public void draw() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user