Skip to content

Commit 767ac55

Browse files
committed
Merged in feature-weather (pull request #19)
Feature weather
2 parents 2f3a45c + 0b80215 commit 767ac55

39 files changed

Lines changed: 413 additions & 131 deletions
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://uppbeat.io/sfx/heavy-rain-shower/10257/26429
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://uppbeat.io/sfx/wind-blowing-trees-in-woods/7784/23795
Binary file not shown.

Assets/src/main/resources/assets/Sounds/birds/hargissssound.license

Lines changed: 0 additions & 4 deletions
This file was deleted.
-972 Bytes
Loading

Common/src/main/java/ru/arifolth/anjrpg/interfaces/CombatTracker.java

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,31 @@ public CombatTracker() {
3838
public void update(float tpf) {
3939
inCombat = !enemies.isEmpty();
4040

41-
if(inCombat && !GameState.BATTLE.equals(gameLogicCore.getGameStateManager().getCurrentGameState())) {
42-
gameLogicCore.getGameStateManager().setGameState(GameState.BATTLE);
43-
}
41+
isNotInBattle();
42+
43+
isInBattle();
44+
}
4445

46+
private void isInBattle() {
4547
if(!inCombat && GameState.BATTLE.equals(gameLogicCore.getGameStateManager().getCurrentGameState())) {
46-
gameLogicCore.getGameStateManager().setGameState(GameState.CALM);
48+
leaveBattle();
49+
}
50+
}
51+
52+
private void isNotInBattle() {
53+
if(inCombat && !GameState.BATTLE.equals(gameLogicCore.getGameStateManager().getCurrentGameState())) {
54+
joinBattle();
4755
}
4856
}
4957

58+
private void leaveBattle() {
59+
gameLogicCore.getGameStateManager().setGameState(GameState.CALM);
60+
}
61+
62+
private void joinBattle() {
63+
gameLogicCore.getGameStateManager().setGameState(GameState.BATTLE);
64+
}
65+
5066
@Override
5167
public void decCounter(CharacterInterface enemy) {
5268
enemies.remove(enemy);

Common/src/main/java/ru/arifolth/anjrpg/interfaces/Constants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class Constants {
3636
public static final int MODEL_ADJUSTMENT = 3;
3737

3838
public static final float SOUND_VOLUME = 0.5f;
39-
public static final float MUSIC_VOLUME_MULTIPLIER = 0.25f;
39+
public static final float MUSIC_VOLUME_MULTIPLIER = 0.225f;
4040

4141
public static final float SOUND_PITCH = 0.5f;
4242
public static final SSAOFilter SSAO_FILTER_BASIC = new SSAOFilter(1f, 1.5f, 5.8f, 0.9f);

Common/src/main/java/ru/arifolth/anjrpg/interfaces/FilterManagerInterface.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,9 @@
2121
public interface FilterManagerInterface {
2222
void initialize();
2323

24+
void addFog();
25+
26+
void removeFog();
27+
2428
void update(float tpf);
2529
}

0 commit comments

Comments
 (0)