Newer
Older
JumpingGame / src / main / java / entities / JumpGame.java
k-fujii on 15 Nov 2021 1 KB entity→entitiesに変更
package entities;

public class JumpGame {
    private Time time = new Time();
    private Ground ground = new Ground();
    private Position position = new Position(ground);
    private Gameover gameover = new Gameover(position);
    private Onground onground = new Onground(ground, position);
    private Velocity velocity = new Velocity(position, onground);
    private Clear clear = new Clear(position);
    private Move move = new Move(velocity);
    private Acceleration acceleration = new Acceleration(velocity, onground);
    private Force force = new Force(acceleration);
    private Mass mass = new Mass(acceleration);

    public void gravity(double y) {
        this.force.gravity(y);
        this.time.gravity(y);
    }

    public void moveX(double x) {
        this.move.moveX(x);
    }

    public void moveY(double y) {
        this.move.moveY(y);
    }

    public void setMass(double x) {
        this.mass.setValue(x);
    }

    public Pair<Double> getAcceleration() {
        return acceleration.getValue();
    }

    public Pair<Double> getMove() {
        return move.getValue();
    }

    public double getMass() {
        return mass.getValue();
    }

    public boolean getClear() {
        return clear.getClear();
    }

    public boolean getGround() {
        return ground.getValue();
    }

    public Pair<Double> getForce() {
        return force.getValue();
    }

    public Pair<Double> getVelocity() {
        return velocity.getValue();
    }

    public Pair<Double> getPosition() {
        return position.getValue();
    }

    public boolean getOnground() {
        return onground.getOnground();
    }

    public double getTime() {
        return time.getValue();
    }

    public boolean getGameover() {
        return gameover.getGameover();
    }
}