fix object color override for sb
This commit is contained in:
parent
e853abcd9f
commit
711fd0a03e
|
@ -101,4 +101,9 @@ public class FakeGameObject extends GameObject {
|
|||
public void setTime(int time) {
|
||||
this.halfTime = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateColor() {
|
||||
}
|
||||
|
||||
}
|
|
@ -60,6 +60,8 @@ public class Circle extends GameObject {
|
|||
/** Whether or not the circle result ends the combo streak. */
|
||||
private boolean comboEnd;
|
||||
|
||||
private int comboColorIndex;
|
||||
|
||||
/**
|
||||
* Initializes the Circle data type with map modifiers, images, and dimensions.
|
||||
* @param container the game container
|
||||
|
@ -86,9 +88,9 @@ public class Circle extends GameObject {
|
|||
this.game = game;
|
||||
this.data = data;
|
||||
this.comboEnd = comboEnd;
|
||||
this.comboColorIndex = comboColorIndex;
|
||||
updateColor();
|
||||
updatePosition();
|
||||
color = Dancer.colorOverride.getColor(comboColorIndex);
|
||||
mirrorColor = Dancer.colorMirrorOverride.getColor(comboColorIndex);
|
||||
}
|
||||
|
||||
public Circle(float x, float y, int time) {
|
||||
|
@ -265,4 +267,10 @@ public class Circle extends GameObject {
|
|||
return mirrorColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateColor() {
|
||||
color = Dancer.colorOverride.getColor(comboColorIndex);
|
||||
mirrorColor = Dancer.colorMirrorOverride.getColor(comboColorIndex);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -100,4 +100,8 @@ public class DummyObject extends GameObject {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateColor() {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -101,4 +101,6 @@ public abstract class GameObject {
|
|||
public abstract Color getColor();
|
||||
public abstract Color getMirroredColor();
|
||||
|
||||
public abstract void updateColor();
|
||||
|
||||
}
|
||||
|
|
|
@ -117,6 +117,8 @@ public class Slider extends GameObject {
|
|||
|
||||
public float pixelLength;
|
||||
|
||||
private int comboColorIndex;
|
||||
|
||||
/**
|
||||
* Initializes the Slider data type with images and dimensions.
|
||||
* @param container the game container
|
||||
|
@ -162,8 +164,8 @@ public class Slider extends GameObject {
|
|||
this.game = game;
|
||||
this.data = data;
|
||||
this.comboEnd = comboEnd;
|
||||
color = Dancer.colorOverride.getColor(comboColorIndex);
|
||||
mirrorColor = Dancer.colorMirrorOverride.getColor(comboColorIndex);
|
||||
this.comboColorIndex = comboColorIndex;
|
||||
updateColor();
|
||||
updatePosition();
|
||||
|
||||
this.pixelLength = hitObject.getPixelLength();
|
||||
|
@ -710,4 +712,10 @@ public class Slider extends GameObject {
|
|||
return ticks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateColor() {
|
||||
color = Dancer.colorOverride.getColor(comboColorIndex);
|
||||
mirrorColor = Dancer.colorMirrorOverride.getColor(comboColorIndex);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -438,4 +438,7 @@ public class Spinner extends GameObject {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateColor() {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -188,6 +188,7 @@ public class SBOverlay {
|
|||
for (Object o : options.entrySet()) {
|
||||
Map.Entry<Options.GameOption, String> next = (Map.Entry<Options.GameOption, String>) o;
|
||||
next.getKey().read(next.getValue());
|
||||
readOption(next.getKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -212,6 +213,16 @@ public class SBOverlay {
|
|||
for (Options.GameOption o : options.getSavedOptionList()) {
|
||||
if (initialOptions.containsKey(o)) {
|
||||
o.read(initialOptions.get(o));
|
||||
readOption(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// needed for object color overrides...
|
||||
private void readOption(Options.GameOption o) {
|
||||
if (o == Options.GameOption.DANCE_OBJECT_COLOR_OVERRIDE || o == Options.GameOption.DANCE_OBJECT_COLOR_OVERRIDE_MIRRORED) {
|
||||
for (int i = index; i < gameObjects.length; i++) {
|
||||
gameObjects[i].updateColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user