workarounded indicator, fixed minor problems
This commit is contained in:
parent
72bc89ccb1
commit
92344328be
Binary file not shown.
|
Before Width: | Height: | Size: 785 B |
BIN
ShootingStars/assets/Textures/heat_ind_color.png
Normal file
BIN
ShootingStars/assets/Textures/heat_ind_color.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@ -60,7 +60,7 @@ public class ShootingStars extends SimpleApplication {
|
||||
public ShootingStars(OptionSettings optionSettings) {
|
||||
super(new StatsAppState(), new DebugKeysAppState());
|
||||
this.optionSettings = optionSettings;
|
||||
//Logger.getLogger("").setLevel(Level.SEVERE);
|
||||
Logger.getLogger("").setLevel(Level.SEVERE);
|
||||
System.setProperty("jna.library.path", "lib/vlc");
|
||||
}
|
||||
|
||||
|
||||
@ -22,12 +22,12 @@ import com.jme3.input.event.MouseButtonEvent;
|
||||
import com.jme3.math.ColorRGBA;
|
||||
import com.jme3.math.Vector2f;
|
||||
import com.jme3.scene.Spatial;
|
||||
import com.jme3.ui.Picture;
|
||||
import org.wyrez.shootingstars.gui.controls.ButtonBase;
|
||||
import org.wyrez.shootingstars.gui.controls.GuiPlayerPointsControl;
|
||||
import org.wyrez.shootingstars.gui.listener.GameListener;
|
||||
import org.wyrez.shootingstars.helper.ScreenHelper;
|
||||
import tonegod.gui.controls.buttons.Button;
|
||||
import tonegod.gui.controls.extras.Indicator;
|
||||
import tonegod.gui.controls.lists.Dial;
|
||||
import tonegod.gui.controls.text.Label;
|
||||
import tonegod.gui.controls.windows.Panel;
|
||||
@ -43,7 +43,7 @@ public class GameGUI extends Panel {
|
||||
private Button btnStart;
|
||||
private Button btnResume;
|
||||
private Button btnMenu;
|
||||
private Dial indOverheat;
|
||||
private Indicator indOverheat;
|
||||
private AssetManager assetManager;
|
||||
private Spatial player;
|
||||
private Label lblPoints;
|
||||
@ -104,17 +104,17 @@ public class GameGUI extends Panel {
|
||||
btnMenu.setTextAlign(BitmapFont.Align.Center);
|
||||
btnMenu.setFontSize(labelFontSize);
|
||||
|
||||
indOverheat = new Dial(screen, new Vector2f(0f, 0f)) {
|
||||
indOverheat = new Indicator(screen, new Vector2f(0f, 0f), Indicator.Orientation.VERTICAL) {
|
||||
@Override
|
||||
public void onChange(int arg0, Object arg1) {
|
||||
public void onChange(float arg0, float arg1) {
|
||||
}
|
||||
};
|
||||
indOverheat.setGapStartAngle(60);
|
||||
indOverheat.setGapEndAngle(296);
|
||||
indOverheat.setDimensions(screenHelper.calcX(50f), screenHelper.calcY(50f));
|
||||
indOverheat.setDimensions(screenHelper.calcX(75f), screenHelper.calcY(75f));
|
||||
indOverheat.centerToParent();
|
||||
indOverheat.setDialImageBackground("Textures/crosshair.png");
|
||||
indOverheat.setDialImageIndicator("Textures/heat_ind.png");
|
||||
indOverheat.setBaseImage("Textures/crosshair.png");
|
||||
indOverheat.setIndicatorImage("Textures/heat_ind_color.png");
|
||||
indOverheat.setOverlayImage("Textures/empty.png");
|
||||
indOverheat.setMaxValue(100f);
|
||||
updateOverhead(0f);
|
||||
|
||||
lblPoints = new Label(screen, new Vector2f(startPointPointsx, startPointPointsy), new Vector2f(screenHelper.calcX(275f), screenHelper.calcY(180f)));
|
||||
@ -174,7 +174,7 @@ public class GameGUI extends Panel {
|
||||
}
|
||||
|
||||
public void updateOverhead(float percent) {
|
||||
indOverheat.setSelectedIndex(100*percent);
|
||||
indOverheat.setCurrentValue(100 * percent);
|
||||
}
|
||||
|
||||
public void setPoints(String points) {
|
||||
|
||||
@ -115,6 +115,7 @@ public class GameState extends AbstractAppState implements GameListener, ActionL
|
||||
}
|
||||
|
||||
public void initMediaPlayer() throws Exception {
|
||||
System.out.println("create");
|
||||
mediaPlayer = mediaPlayerFactory.newDirectMediaPlayer(settings.getVideoFormat(),
|
||||
settings.getVideoWidth(), settings.getVideoHeight(),
|
||||
settings.getVideoWidth() * settings.getVideoDepth(), cinema);
|
||||
@ -244,6 +245,7 @@ public class GameState extends AbstractAppState implements GameListener, ActionL
|
||||
}
|
||||
|
||||
public void finished() {
|
||||
isFinished = false;
|
||||
highscoreManager.addScore(settings, optionSettings, Integer.valueOf(player.getUserData(UserDataKeys.POINTS).toString()));
|
||||
stateManager.setState(State.HIGHSCORE);
|
||||
}
|
||||
|
||||
@ -59,9 +59,9 @@ public class OptionSettings {
|
||||
settings.setTitle("Shooting Stars");
|
||||
settings.setSettingsDialogImage("");
|
||||
setMasterVolume(100);
|
||||
setMenuVolume(100);
|
||||
setMenuVolume(50);
|
||||
setSoundVolume(100);
|
||||
setUsername("Player");
|
||||
setUsername("Nagareboshi");
|
||||
setPostProcessing(true);
|
||||
setParticleDensity(3);
|
||||
setDepthBits(24);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user