Merge branch 'main' of github.com:Wil-Ro/gamejam2024

This commit is contained in:
James 2024-04-21 12:47:59 +01:00
commit ef4c33ddf0
2 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,32 @@
package com.monjaro.gamejam;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.monjaro.gamejam.main.Actor;
public class SegmentUI extends Actor {
private Texture separator;
private Texture criteriaSheet;
@Override
public void tick() {
}
@Override
public void render(SpriteBatch batch) {
// batch.end();
//
// ShapeRenderer renderer = new ShapeRenderer();
// renderer.begin(ShapeRenderer.ShapeType.Filled);
// renderer.setColor(0.4f, 0.7f, 0.4f, 1);
// renderer.rect(0, (Gdx.graphics.getHeight()/3)*2, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()/3);
// renderer.end();
//
// batch.begin();
}
}

View file

@ -7,6 +7,7 @@ import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.utils.ScreenUtils; import com.badlogic.gdx.utils.ScreenUtils;
import com.monjaro.gamejam.SegmentUI;
import com.monjaro.gamejam.segment.DualSegment; import com.monjaro.gamejam.segment.DualSegment;
import com.monjaro.gamejam.segment.KinSegment; import com.monjaro.gamejam.segment.KinSegment;
import com.monjaro.gamejam.segment.OlympicSegment; import com.monjaro.gamejam.segment.OlympicSegment;
@ -28,6 +29,7 @@ public class Game extends ApplicationAdapter {
private Round round; private Round round;
private UI ui; private UI ui;
private SegmentUI segUi;
@Override @Override
public void create() { public void create() {
@ -36,6 +38,8 @@ public class Game extends ApplicationAdapter {
font.getData().markupEnabled = true; font.getData().markupEnabled = true;
img = new Texture("badlogic.jpg"); img = new Texture("badlogic.jpg");
segUi = new SegmentUI();
ui = new UI(this, 50, 280); ui = new UI(this, 50, 280);
round = new Round(List.of(new OlympicSegment(1), new OlympicSegment(3), new KinSegment(3), new DualSegment(false)), List.of(new ParityDecay(true)), 5); round = new Round(List.of(new OlympicSegment(1), new OlympicSegment(3), new KinSegment(3), new DualSegment(false)), List.of(new ParityDecay(true)), 5);
@ -129,6 +133,8 @@ public class Game extends ApplicationAdapter {
ui.render(batch); ui.render(batch);
segUi.render(batch);
batch.end(); batch.end();
} }