Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

Commit

Permalink
feat👣: dauerfeuer
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminB109 committed Jun 17, 2024
1 parent 4d0cf3b commit 9e251b9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions game/core/src/main/de/dhbw/tinf22b6/gameobject/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static de.dhbw.tinf22b6.util.Constants.TILE_SIZE;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.graphics.Camera;
import com.badlogic.gdx.graphics.g2d.Animation;
import com.badlogic.gdx.graphics.g2d.Batch;
Expand Down Expand Up @@ -155,6 +156,9 @@ public void tick(float delta) {
pos.x = body.getPosition().x - (float) TILE_SIZE / 2;
pos.y = body.getPosition().y - (float) TILE_SIZE / 4;
}
if (Gdx.input.isButtonPressed(Input.Buttons.LEFT)) {
shoot();
}
}

public void applyForce(Vector2 motionVector) {
Expand Down
2 changes: 1 addition & 1 deletion game/core/src/main/de/dhbw/tinf22b6/weapon/Ak.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

public class Ak extends Weapon {
public Ak() {
super("ak", 25, 0.2f, 50);
super("ak", 25, 0.3f, 50);
this.shootingAnimation = new Animation<>(0.01f, Assets.instance.getAnimationAtlasRegion("ak"));
}

Expand Down
2 changes: 1 addition & 1 deletion game/core/src/main/de/dhbw/tinf22b6/weapon/M4.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

public class M4 extends Weapon {
public M4() {
super("m4", 30, 0.05f, 40);
super("m4", 30, 0.2f, 40);
this.shootingAnimation = new Animation<>(0.001f, Assets.instance.getAnimationAtlasRegion("m4"));
}

Expand Down
4 changes: 2 additions & 2 deletions game/core/src/main/de/dhbw/tinf22b6/weapon/MP7.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

public class MP7 extends Weapon {
public MP7() {
super("mp7", 40, 0.003f, 40);
this.shootingAnimation = new Animation<>(0.003f, Assets.instance.getAnimationAtlasRegion("mp7"));
super("mp7", 40, 0.05f, 40);
this.shootingAnimation = new Animation<>(0.005f, Assets.instance.getAnimationAtlasRegion("mp7"));
}

@Override
Expand Down

0 comments on commit 9e251b9

Please sign in to comment.