mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-10 18:57:39 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
bceb7b5809
@ -34,6 +34,10 @@ public abstract class BulletType extends Content{
|
|||||||
public Effect smokeEffect = Fx.shootSmallSmoke;
|
public Effect smokeEffect = Fx.shootSmallSmoke;
|
||||||
/** Sound made when hitting something or getting removed.*/
|
/** Sound made when hitting something or getting removed.*/
|
||||||
public Sound hitSound = Sounds.none;
|
public Sound hitSound = Sounds.none;
|
||||||
|
/** Pitch of the sound made when hitting something*/
|
||||||
|
public float hitSoundPitch = 1;
|
||||||
|
/** Volume of the sound made when hitting something*/
|
||||||
|
public float hitSoundVolume = 1;
|
||||||
/** Extra inaccuracy when firing. */
|
/** Extra inaccuracy when firing. */
|
||||||
public float inaccuracy = 0f;
|
public float inaccuracy = 0f;
|
||||||
/** How many bullets get created per ammo item/liquid. */
|
/** How many bullets get created per ammo item/liquid. */
|
||||||
@ -186,7 +190,7 @@ public abstract class BulletType extends Content{
|
|||||||
|
|
||||||
public void hit(Bullet b, float x, float y){
|
public void hit(Bullet b, float x, float y){
|
||||||
hitEffect.at(x, y, b.rotation(), hitColor);
|
hitEffect.at(x, y, b.rotation(), hitColor);
|
||||||
hitSound.at(b);
|
hitSound.at(x, y, hitSoundPitch, hitSoundVolume);
|
||||||
|
|
||||||
Effect.shake(hitShake, hitShake, b);
|
Effect.shake(hitShake, hitShake, b);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user