Skip to content

Commit

Permalink
Restore the erased snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
Dariasteam committed Feb 19, 2019
1 parent 1c26436 commit c5da153
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
11 changes: 11 additions & 0 deletions Scenes/Player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,17 @@ func set_player_rotation (value):
axis.set_rotation_deg(Vector3(0,value,0))
camera_axis.set_rotation_deg(Vector3(0,value,0))

func end_animation():
ball.hide()
rigid.set_linear_velocity(Vector3(0,0,0))
rigid.set_gravity_scale(0)
rigid_2.set_linear_velocity(Vector3(0,0,0))
rigid_2.set_gravity_scale(0)
idle_particles.set_emitting(false)
trail.set_emitting(false)

die_particles.set_emitting(true)


func is_in_range (v, r_a, r_b):
return v > r_a and v < r_b
Expand Down
8 changes: 6 additions & 2 deletions Scenes/segment.gd
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ func set_bad():
get_node("REGULAR/StaticBody").add_to_group("bad")

func explode():
get_node("REGULAR/StaticBody").queue_free()
get_node("REGULAR/AnimationPlayer").play("explode")
var a = get_node("REGULAR/StaticBody");
if (a != null):
a.queue_free()
a = get_node("REGULAR/AnimationPlayer");
if (a != null):
a.play("explode")

func meteorize():
get_node("REGULAR/StaticBody").queue_free()
Expand Down

0 comments on commit c5da153

Please sign in to comment.