Skip to content

Commit 470f3a7

Browse files
committedJan 18, 2025
make unit fire at gameplay
1 parent e65f46f commit 470f3a7

File tree

1 file changed

+33
-27
lines changed

1 file changed

+33
-27
lines changed
 

‎src/bluearchive/units/UnitSound.java

+33-27
Original file line numberDiff line numberDiff line change
@@ -101,42 +101,48 @@ public static void init() {
101101
}
102102
});
103103
Timer.schedule(() -> {
104-
ArisuShootSound = Seq.with(Sounds.pulseBlast, Sounds.pulseBlast, Sounds.pulseBlast, Sounds.pulseBlast, ArisuAttack1, ArisuAttack2, ArisuAttack3);
105-
Sound ArisuAssignedSound = ArisuShootSound.random();
106-
if (ArisuAssignedSound != Sounds.pulseBlast) {
107-
UnitTypes.collaris.weapons.get(0).soundPitchMin = 1f;
108-
UnitTypes.collaris.weapons.get(1).soundPitchMin = 1f;
109-
} else {
110-
UnitTypes.collaris.weapons.get(0).soundPitchMin = 0.8f;
111-
UnitTypes.collaris.weapons.get(1).soundPitchMin = 0.8f;
104+
if (Vars.state.isPlaying() || Vars.state.isGame()) {
105+
ArisuShootSound = Seq.with(Sounds.pulseBlast, Sounds.pulseBlast, Sounds.pulseBlast, Sounds.pulseBlast, ArisuAttack1, ArisuAttack2, ArisuAttack3);
106+
Sound ArisuAssignedSound = ArisuShootSound.random();
107+
if (ArisuAssignedSound != Sounds.pulseBlast) {
108+
UnitTypes.collaris.weapons.get(0).soundPitchMin = 1f;
109+
UnitTypes.collaris.weapons.get(1).soundPitchMin = 1f;
110+
} else {
111+
UnitTypes.collaris.weapons.get(0).soundPitchMin = 0.8f;
112+
UnitTypes.collaris.weapons.get(1).soundPitchMin = 0.8f;
113+
}
114+
UnitTypes.collaris.weapons.get(0).shootSound = ArisuAssignedSound;
115+
UnitTypes.collaris.weapons.get(1).shootSound = ArisuAssignedSound;
112116
}
113-
UnitTypes.collaris.weapons.get(0).shootSound = ArisuAssignedSound;
114-
UnitTypes.collaris.weapons.get(1).shootSound = ArisuAssignedSound;
115117
}, 0, 2.15f);
116118

117119
Timer.schedule(() -> {
118-
HinaShootSound = Seq.with(Sounds.shootBig, Sounds.shootBig, Sounds.shootBig, Sounds.shootBig, Sounds.shootBig, Sounds.shootBig, HinaAttack1, HinaAttack2, HinaAttack3);
119-
Sound HinaAssignedSound = HinaShootSound.random();
120-
if (HinaAssignedSound != Sounds.shootBig) {
121-
UnitTypes.toxopid.weapons.get(0).soundPitchMin = 1f;
122-
UnitTypes.toxopid.weapons.get(1).soundPitchMin = 1f;
123-
} else {
124-
UnitTypes.toxopid.weapons.get(0).soundPitchMin = 0.8f;
125-
UnitTypes.toxopid.weapons.get(1).soundPitchMin = 0.8f;
120+
if (Vars.state.isPlaying() || Vars.state.isGame()) {
121+
HinaShootSound = Seq.with(Sounds.shootBig, Sounds.shootBig, Sounds.shootBig, Sounds.shootBig, Sounds.shootBig, Sounds.shootBig, HinaAttack1, HinaAttack2, HinaAttack3);
122+
Sound HinaAssignedSound = HinaShootSound.random();
123+
if (HinaAssignedSound != Sounds.shootBig) {
124+
UnitTypes.toxopid.weapons.get(0).soundPitchMin = 1f;
125+
UnitTypes.toxopid.weapons.get(1).soundPitchMin = 1f;
126+
} else {
127+
UnitTypes.toxopid.weapons.get(0).soundPitchMin = 0.8f;
128+
UnitTypes.toxopid.weapons.get(1).soundPitchMin = 0.8f;
129+
}
130+
UnitTypes.toxopid.weapons.get(0).shootSound = HinaAssignedSound;
131+
UnitTypes.toxopid.weapons.get(1).shootSound = HinaAssignedSound;
126132
}
127-
UnitTypes.toxopid.weapons.get(0).shootSound = HinaAssignedSound;
128-
UnitTypes.toxopid.weapons.get(1).shootSound = HinaAssignedSound;
129133
}, 0, 0.5f);
130134

131135
Timer.schedule(() -> {
132-
Seq<Sound> HinaArtillerySound = Seq.with(Sounds.shootBig, Sounds.shootBig, Sounds.shootBig, Sounds.shootBig, HinaArtillery);
133-
Sound HinaArtilleryAssignedSound = HinaArtillerySound.random();
134-
if (HinaArtilleryAssignedSound != Sounds.shootBig) {
135-
UnitTypes.toxopid.weapons.get(2).soundPitchMin = 1f;
136-
} else {
137-
UnitTypes.toxopid.weapons.get(2).soundPitchMin = 0.8f;
136+
if (Vars.state.isPlaying() || Vars.state.isGame()) {
137+
Seq<Sound> HinaArtillerySound = Seq.with(Sounds.shootBig, Sounds.shootBig, Sounds.shootBig, Sounds.shootBig, HinaArtillery);
138+
Sound HinaArtilleryAssignedSound = HinaArtillerySound.random();
139+
if (HinaArtilleryAssignedSound != Sounds.shootBig) {
140+
UnitTypes.toxopid.weapons.get(2).soundPitchMin = 1f;
141+
} else {
142+
UnitTypes.toxopid.weapons.get(2).soundPitchMin = 0.8f;
143+
}
144+
UnitTypes.toxopid.weapons.get(2).shootSound = HinaArtilleryAssignedSound;
138145
}
139-
UnitTypes.toxopid.weapons.get(2).shootSound = HinaArtilleryAssignedSound;
140146
}, 0, 3.5f);
141147

142148
Log.infoTag("ArchiveDustry", "Unit Sounds Loaded!");

0 commit comments

Comments
 (0)