forked from team-sg/hero-mark-2
add temp sounds and crt filter
This commit is contained in:
parent
4790b2b2a4
commit
f012e8fa77
21 changed files with 140 additions and 12 deletions
|
@ -10,4 +10,5 @@ func _on_Area2D_area_entered(area):
|
|||
#Collect
|
||||
if area.is_in_group("player"):
|
||||
Game.golds += value
|
||||
Game.play_sound(Game.a_gold,Game.ac_collectible)
|
||||
queue_free()
|
||||
|
|
|
@ -9,6 +9,7 @@ func _ready():
|
|||
func _on_Area2D_area_entered(area):
|
||||
#Collect
|
||||
if area.is_in_group("player"):
|
||||
Game.play_sound(Game.a_star,Game.ac_collectible)
|
||||
Game.stars += value
|
||||
#5 Star reward
|
||||
if Game.stars == 5: Game.shards += 1
|
||||
|
|
|
@ -49,9 +49,6 @@ func _physics_process(delta):
|
|||
if current_state != State.CLIMB: velocity.y += gravity
|
||||
#Apply velocity
|
||||
move_and_slide(velocity,Vector2.UP)
|
||||
|
||||
print(Game.shards)
|
||||
if Input.is_action_just_pressed("debug_1"): $AnimationPlayer.play("Stab")
|
||||
|
||||
func _process_idle():
|
||||
if anims.get_current_animation() != "idle": anims.play("idle")
|
||||
|
@ -112,6 +109,7 @@ func _process_climb():
|
|||
#Auto Jump
|
||||
if climb_ray.get_collider() == null:
|
||||
velocity.y = -jump_force
|
||||
Game.play_sound(Game.a_jump,Game.ac_jump)
|
||||
current_state = State.FALL
|
||||
return
|
||||
|
||||
|
@ -134,6 +132,7 @@ func check_jump():
|
|||
# Jump
|
||||
jump_pressure = 0
|
||||
current_state = State.JUMP
|
||||
Game.play_sound(Game.a_jump,Game.ac_jump)
|
||||
anims.play("jump")
|
||||
velocity.y = -jump_force
|
||||
move(walk_speed,0,true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue