2021-04-08 19:34:17 +00:00
|
|
|
package sagittarius.view;
|
2021-04-05 16:45:57 +00:00
|
|
|
|
|
|
|
import com.badlogic.gdx.graphics.Color;
|
2021-04-09 09:57:52 +00:00
|
|
|
import com.badlogic.gdx.math.Vector2;
|
2021-04-09 11:31:56 +00:00
|
|
|
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
|
|
|
import com.badlogic.gdx.scenes.scene2d.InputListener;
|
2021-04-09 09:57:52 +00:00
|
|
|
import com.badlogic.gdx.scenes.scene2d.Stage;
|
2021-04-05 16:45:57 +00:00
|
|
|
|
2021-04-09 09:57:52 +00:00
|
|
|
import sagittarius.model.*;
|
2021-04-05 16:45:57 +00:00
|
|
|
|
2021-04-09 09:57:52 +00:00
|
|
|
public class GameScreen extends BaseScreen {
|
2021-04-05 16:45:57 +00:00
|
|
|
|
2021-04-09 09:57:52 +00:00
|
|
|
// ---------- ATTRIBUTEs ----------
|
2021-04-05 16:45:57 +00:00
|
|
|
|
2021-04-09 09:57:52 +00:00
|
|
|
// Constants
|
|
|
|
public static final int G = 100;
|
2021-04-05 16:45:57 +00:00
|
|
|
|
2021-04-09 09:57:52 +00:00
|
|
|
// ---------- METHODs ----------
|
2021-04-05 16:45:57 +00:00
|
|
|
|
|
|
|
@Override
|
2021-04-09 09:57:52 +00:00
|
|
|
public void initialize() {
|
|
|
|
|
|
|
|
mainStage = new Stage();
|
|
|
|
|
|
|
|
Planet planet1 = new Planet(new Vector2(400, 400), 1000, 200, Color.WHITE);
|
|
|
|
planet1.setDebug(true);
|
|
|
|
mainStage.addActor(planet1);
|
|
|
|
|
|
|
|
Player player1 = new Player(planet1, Color.WHITE);
|
|
|
|
player1.setDebug(true);
|
|
|
|
mainStage.addActor(player1);
|
|
|
|
|
2021-04-05 16:45:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2021-04-09 09:57:52 +00:00
|
|
|
public void update(float dt) {
|
|
|
|
// todo ?
|
2021-04-05 16:45:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|