fixed minor issues in creative screen
This commit is contained in:
parent
2e5c1064ac
commit
d92af2b964
@ -32,6 +32,7 @@ public class Flake extends Entity {
|
||||
shards[i].init(x, y, 360/shards.length*i, 0, 2);
|
||||
ec.getStage().addActor(shards[i]);
|
||||
}
|
||||
|
||||
this.speed = rate;
|
||||
this.timer = fuse;
|
||||
this.totalTime = fuse;
|
||||
|
@ -44,9 +44,7 @@ public class Pellet extends Entity implements Poolable {
|
||||
|
||||
@Override
|
||||
public void collided(Entity entity) {
|
||||
if (entity.getClass() == PolyjetEntity.class) {
|
||||
dead = true;
|
||||
}
|
||||
dead = true;
|
||||
super.collided(entity);
|
||||
}
|
||||
|
||||
|
@ -135,6 +135,7 @@ public class GamePlayArea extends Stage {
|
||||
if (currentSpawnInfo[i].getEntityCoordinator() != null) {
|
||||
entity.setCoordinator(currentSpawnInfo[i].getEntityCoordinator().buildCoordinator());
|
||||
}
|
||||
|
||||
entity.init(currentSpawnInfo[i].parameters);
|
||||
addActor(entity);
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
package zero1hd.rhythmbullet.ui.windows;
|
||||
|
||||
import com.badlogic.gdx.Input.Keys;
|
||||
import com.badlogic.gdx.audio.Music;
|
||||
import com.badlogic.gdx.audio.Music.OnCompletionListener;
|
||||
import com.badlogic.gdx.math.MathUtils;
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
@ -15,7 +17,7 @@ import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||
|
||||
import zero1hd.rhythmbullet.audio.AudioData;
|
||||
|
||||
public class MusicController extends Window {
|
||||
public class MusicController extends Window implements OnCompletionListener {
|
||||
Skin skin;
|
||||
private Image togglePlay;
|
||||
private TextField info;
|
||||
@ -57,12 +59,8 @@ public class MusicController extends Window {
|
||||
togglePlay.setDrawable(skin.getDrawable("arrow"));
|
||||
|
||||
} else {
|
||||
try {
|
||||
togglePlay.setDrawable(skin.getDrawable("pause"));
|
||||
audiofile.getPlaybackMusic().play();
|
||||
} catch (NullPointerException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
togglePlay.setDrawable(skin.getDrawable("pause"));
|
||||
audiofile.getPlaybackMusic().play();
|
||||
}
|
||||
}
|
||||
super.clicked(event, x, y);
|
||||
@ -129,4 +127,10 @@ public class MusicController extends Window {
|
||||
public AudioData getAudiofile() {
|
||||
return audiofile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCompletion(Music music) {
|
||||
audiofile.dispose();
|
||||
audiofile = null;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user