Fixed healing gfx effect

This commit is contained in:
Paul Norberger
2020-04-19 14:20:35 +02:00
parent 8af0bebad4
commit 9df42a3245
3 changed files with 11 additions and 15 deletions

View File

@@ -18,8 +18,6 @@ onready var debug_label := $DebugLabel
onready var animation_state := $AnimationStates
# Variables for sound selection
onready var walk_sounds = $Sounds/Walk
onready var walk_sound_timer = $Sounds/WalkSoundTimer
var _rng = RandomNumberGenerator.new()
var is_playing_sound = false
@@ -65,8 +63,7 @@ func _physics_process(delta):
moveState.HIT:
movement_hit()
print(heal_per_second)
$"Effects/HealEffect".emitting = heal_per_second > 0.0
$"Effects/HealEffect".emitting = heal_per_second > 0
move()
# IMPORTANT: If you are using move_and_slide don't multiply by delta

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=61 format=2]
[gd_scene load_steps=62 format=2]
[ext_resource path="res://Player/Player.gd" type="Script" id=1]
[ext_resource path="res://Player/player.png" type="Texture" id=2]
@@ -6,12 +6,12 @@
[ext_resource path="res://Overlap/HurtHit_Box/Hitbox.tscn" type="PackedScene" id=4]
[ext_resource path="res://Overlap/Stats/Stats.tscn" type="PackedScene" id=5]
[ext_resource path="res://Fonts/Harmonic/Harmonic.ttf" type="DynamicFontData" id=6]
[ext_resource path="res://Effects/Heal/HealEffect.tscn" type="PackedScene" id=7]
[ext_resource path="res://Player/States/Idle.gd" type="Script" id=12]
[ext_resource path="res://Player/States/Run.gd" type="Script" id=13]
[ext_resource path="res://Player/States/Attack.gd" type="Script" id=14]
[ext_resource path="res://Player/PlayerStateMachine.gd" type="Script" id=15]
[ext_resource path="res://Player/States/Roll.gd" type="Script" id=16]
[ext_resource path="res://Effects/Heal/HealEffect.tscn" type="PackedScene" id=7]
[sub_resource type="CapsuleShape2D" id=1]
radius = 2.15976
@@ -733,11 +733,10 @@ script = ExtResource( 14 )
[node name="Roll" type="Node" parent="AnimationStates"]
script = ExtResource( 16 )
[node name="Effects" type="Node" parent="."]
[node name="Effects" type="Node2D" parent="."]
[node name="HealEffect" parent="Effects" instance=ExtResource( 7 )]
position = Vector2( 0, -3.24489 )
emitting = false
[connection signal="area_entered" from="Hitbox" to="." method="_on_Hitbox_area_entered"]
[connection signal="area_entered" from="Hurtbox" to="." method="_on_Hurtbox_area_entered"]
[connection signal="area_exited" from="Hurtbox" to="." method="_on_Hurtbox_area_exited"]

View File

@@ -48,12 +48,6 @@ position = Vector2( 88, 75.4221 )
[node name="Boss_template" parent="YSort" instance=ExtResource( 17 )]
position = Vector2( -107.855, -54.5179 )
[node name="Player" parent="YSort" instance=ExtResource( 1 )]
position = Vector2( 296, -32 )
scale = Vector2( 2, 2 )
debug = true
FRICTION = 200
[node name="minion" parent="YSort" instance=ExtResource( 17 )]
position = Vector2( 88, 24 )
scale = Vector2( 0.3, 0.3 )
@@ -122,6 +116,12 @@ position = Vector2( 8.00002, -80 )
[node name="Banana" parent="YSort" instance=ExtResource( 6 )]
position = Vector2( -107.855, 73.4821 )
[node name="Player" parent="YSort" instance=ExtResource( 1 )]
position = Vector2( 96, -69.5179 )
scale = Vector2( 2, 2 )
debug = true
FRICTION = 200
[node name="Bonfire" parent="." instance=ExtResource( 7 )]
position = Vector2( 448, 104 )