Skip to content

Commit

Permalink
💄 Update layers
Browse files Browse the repository at this point in the history
  • Loading branch information
yhs0602 committed Oct 18, 2020
1 parent e00e85a commit 40d5d63
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions app/src/main/java/sma/rhythmtapper/game/GameScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,8 @@ public void paint(float deltaTime) {

// Example:
if (videoPlayer == null)
g.drawScaledImage(Assets.background, 0, 0, _gameWidth, _gameHeight, 0, 0, Assets.background.getWidth(), Assets.background.getHeight());
g.drawRect(0,0,_gameWidth,_gameHeight, Color.BLACK);
// g.drawScaledImage(Assets.background, 0, 0, _gameWidth, _gameHeight, 0, 0, Assets.background.getWidth(), Assets.background.getHeight());
else {
_currentTime = _currentTrack.getCurrentPosition() / 1000.0f;
//Bitmap bitmap = videoPlayer.getScaledFrameAtTime((long)(_currentTime*1000000.0f),FFmpegMediaMetadataRetriever.OPTION_CLOSEST_SYNC,_gameWidth,_gameHeight);
Expand Down Expand Up @@ -1119,15 +1120,19 @@ public void paint(float deltaTime) {
g.drawRect(_gameWidth / 5 * 3, 0, _gameWidth / 5 + 1, _gameHeight, Color.argb(_laneHitAlpha4, 255, 0, 0));
g.drawRect(_gameWidth / 5 * 4, 0, _gameWidth / 5 + 1, _gameHeight, Color.argb(_laneHitAlpha5, 255, 0, 0));
*/
if(state == GameState.Running) {
//g.drawString(""+bundle.score, (int)(_gameWidth*0.52f), 80, _paintScore);
if (bundle.combo > 0)
DrawString(g, bundle.combo + "\nCOMBO", (int) (_gameWidth * 0.7f), (int) (EnvVar.gameHeight * 0.3f), _paintCombo, _paintComboShadow);
judgePopup.Paint(g);
}

final int dx = _gameWidth / 10;
for (int i = 0; i < 5; i++) {
int n = 2 * i + 1;
g.drawImage(Assets.ballHitpoint, (int) (dx * n - SIZE_BALL), (int) (HITBOX_CENTER - SIZE_BALL), SIZE_BALL * 2, SIZE_BALL * 2);
}

if (state == GameState.Running)
drawRunningUI();

for (HelperLine h : helperLines) {
h.Paint(g);
}
Expand All @@ -1142,6 +1147,8 @@ public void paint(float deltaTime) {
}
}
}
if (state == GameState.Running)
drawRunningUI();
//if (_explosionTicker > 0)
//{
// if (_rand.nextDouble() > 0.05)
Expand Down Expand Up @@ -1284,9 +1291,9 @@ private void drawReadyUI() {
private void drawRunningUI() {
Graphics g = game.getGraphics();

if (_doubleMultiplierTicker > 0) {
g.drawImage(Assets.sirens, 0, 100);
}
// if (_doubleMultiplierTicker > 0) {
// g.drawImage(Assets.sirens, 0, 100);
// }

g.drawRect(0, 0, _gameWidth, 50, Color.BLACK);
float ratioOfLife1 = (float) bundle.life / bundle.totalLife;
Expand All @@ -1304,10 +1311,6 @@ private void drawRunningUI() {
// " Multiplier: " + _multiplier * (_doubleMultiplierTicker > 0 ? 2 : 1) + "x" +
// " Lifes remaining: " + _lives;
DrawString(g, "" + bundle.score, (int) (_gameWidth * 0.55f), 80);
//g.drawString(""+bundle.score, (int)(_gameWidth*0.52f), 80, _paintScore);
if (bundle.combo > 0)
DrawString(g, bundle.combo + "\nCOMBO", (int) (_gameWidth * 0.7f), (int) (EnvVar.gameHeight * 0.3f), _paintCombo, _paintComboShadow);
judgePopup.Paint(g);
//g.drawString(bundle.testResult.name(), (int) (_gameWidth * 0.5f), 350, _paintScore);
List<Skill> skills = deck.getActivatedSkills();
boolean boost = false;
Expand Down

0 comments on commit 40d5d63

Please sign in to comment.