Skip to content

Commit

Permalink
Removed unnecessary stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
aidan-j-rhoden committed Jan 4, 2023
1 parent cb56d34 commit 151e385
Showing 1 changed file with 4 additions and 43 deletions.
47 changes: 4 additions & 43 deletions scripts/physics/gibs.gd
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ var avz


func _ready():
slide = get_node("audio/slide")
hit = get_node("audio/hit")
roll = get_node("audio/roll")
whoosh = get_node("audio/whoosh")


func _physics_process(delta):
Expand All @@ -43,47 +40,11 @@ func process_stuff():

var bodies = get_colliding_bodies()

if roll:
if bodies.size() > 0:
if !roll.playing:
if abs(avl) > 0.25:
roll.stream = ROLL_SLOW
if abs(avl) > 4:
roll.stream = ROLL_MEDIUM
if abs(avl) > 8:
roll.stream = ROLL_FAST
roll.play()
else:
roll.stop()
if bodies.size() > 0 and (prev_lvl - lvl) >= 0.25:
hit.stream = HIT[randi() % HIT.size()]
hit.play()

roll.unit_size = avl / 3

if slide:
if bodies.size() > 0 and lvl > 0.15:

slide.pitch_scale = 1

if !slide.playing:
slide.stream = SLIDE
slide.play()

# if lvl > 6:
# var particles = particle_scn.instance()
# globals.main.add_child(particles)
# particles.global_transform.origin = global_transform.origin
# particles.emitting = true
else:
slide.stop()

#slide.pitch_scale = clamp(lvl, 1, 1.1)
slide.unit_size = lvl

if hit:
if bodies.size() > 0 and (prev_lvl - lvl) >= 0.25:
hit.stream = HIT[randi() % HIT.size()]
hit.play()

hit.unit_size = lvl
hit.unit_size = lvl

# Set previous velocity
prev_lvl = lvl
Expand Down

0 comments on commit 151e385

Please sign in to comment.