- Quick Fixes
This commit is contained in:
@@ -50,8 +50,10 @@ public class CoinAnimation extends DrawObject {
|
||||
// Coin omlaag verschuiven doordat Y * loops omlaag gaat.
|
||||
// Per frame verschuift het balletje delta 10 op Y-as.
|
||||
try {
|
||||
coinShape.setFrame(coinSetPoint.getX(), coinSetPoint.getY() + (1000 - 35 * PlayState.comboScore) / 25 * timerLoops,
|
||||
coinShape.getWidth(), coinShape.getHeight());
|
||||
coinShape.setFrame(coinSetPoint.getX() * timerLoops * 10, coinSetPoint.getY() * timerLoops,
|
||||
coinShape.getWidth(), coinShape.getHeight());
|
||||
/* coinShape.setFrame(coinSetPoint.getX(), coinSetPoint.getY() + (1000 - 35 * PlayState.comboScore) / 25 * timerLoops,
|
||||
coinShape.getWidth(), coinShape.getHeight());*/
|
||||
} catch (ArithmeticException a) { a.printStackTrace(); }
|
||||
|
||||
timerLoops++;
|
||||
|
||||
@@ -8,15 +8,17 @@ import java.util.LinkedList;
|
||||
|
||||
public class PointAnimation extends DrawObject {
|
||||
|
||||
LinkedList<Point2D.Double> puntenPos = new LinkedList<>();
|
||||
LinkedList<Integer> puntenGain = new LinkedList<>();
|
||||
LinkedList<Integer> iterations = new LinkedList<>();
|
||||
LinkedList<Point2D.Double> puntenPos = new LinkedList<>();
|
||||
LinkedList<Integer> puntenGain = new LinkedList<>();
|
||||
LinkedList<Integer> iterations = new LinkedList<>();
|
||||
|
||||
public static double LastPointIncrement = 0;
|
||||
|
||||
public PointAnimation() { }
|
||||
|
||||
public void enemyDied(Point2D.Double p) {
|
||||
puntenPos.add(new Point2D.Double(p.getX(), p.getY()));
|
||||
puntenGain.add(PlayState.comboScore);
|
||||
puntenGain.add((int)LastPointIncrement);
|
||||
iterations.add(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import main.Window;
|
||||
import model.SongHandler;
|
||||
import model.drawObjects.Enemy;
|
||||
import model.drawObjects.Player;
|
||||
import model.drawObjects.PointAnimation;
|
||||
import model.objects.InfoPanel;
|
||||
import model.objects.Path;
|
||||
import model.objects.PlayArea;
|
||||
@@ -216,7 +217,8 @@ public class PlayState extends GameState {
|
||||
Enemy enemy = enemysInPath.next();
|
||||
if (enemy.getDistanceFromStart() > Enemy.distanceToOctagon || enemy.getDistanceFromStart() > Enemy.distanceToOctagon + sizeOfEnemy) {
|
||||
if (e.getButton().getColor().equals(enemy.getColor())) {
|
||||
currentScore += enemy.getDistanceFromStart() - Enemy.distanceToOctagon;
|
||||
PointAnimation.LastPointIncrement = (int)(enemy.getDistanceFromStart() - Enemy.distanceToOctagon);
|
||||
currentScore += PointAnimation.LastPointIncrement;
|
||||
comboScore += 5;
|
||||
lifePoints = Math.min(lifePoints+10, 100);
|
||||
area.setHitAreaColor(enemy.getColor());
|
||||
@@ -230,7 +232,6 @@ public class PlayState extends GameState {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
player.setBeat();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user