small changes in particles
parent
34e40a666e
commit
185a87a828
|
@ -5,10 +5,10 @@
|
|||
[ext_resource path="res://res/shaders/colorize.tres" type="Material" id=3]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=1]
|
||||
extents = Vector2( 4, 4 )
|
||||
extents = Vector2( 3.5, 3.5 )
|
||||
|
||||
[sub_resource type="RectangleShape2D" id=2]
|
||||
extents = Vector2( 7, 11 )
|
||||
extents = Vector2( 3.5, 9 )
|
||||
|
||||
[sub_resource type="Animation" id=4]
|
||||
resource_name = "RESET"
|
||||
|
@ -48,7 +48,7 @@ tracks/0/loop_wrap = true
|
|||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.9 ),
|
||||
"times": PoolRealArray( 0, 2 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ true, false ]
|
||||
|
@ -100,12 +100,15 @@ anims/damage = SubResource( 3 )
|
|||
[node name="CPUParticles2D" type="CPUParticles2D" parent="."]
|
||||
position = Vector2( 10, 23 )
|
||||
emitting = false
|
||||
amount = 12
|
||||
lifetime = 0.5
|
||||
lifetime_randomness = 1.0
|
||||
local_coords = false
|
||||
emission_shape = 1
|
||||
emission_sphere_radius = 2.0
|
||||
direction = Vector2( -1, 0 )
|
||||
spread = 15.0
|
||||
gravity = Vector2( 0, -10 )
|
||||
initial_velocity = 8.0
|
||||
color = Color( 0.458824, 0.458824, 0.458824, 1 )
|
||||
color = Color( 0.458824, 0.458824, 0.458824, 0.588235 )
|
||||
|
||||
[connection signal="area_entered" from="EnemyCollision" to="." method="area_entered"]
|
||||
|
|
|
@ -94,6 +94,8 @@ func _process(_delta):
|
|||
$Sprite.play("idle") if velocity == Vector2.ZERO else $Sprite.play("run")
|
||||
if abs(velocity.x) > 10:
|
||||
$Sprite.flip_h = true if velocity.x < 0 else false
|
||||
|
||||
if velocity != Vector2.ZERO:
|
||||
$CPUParticles2D.emitting = true
|
||||
$CPUParticles2D.direction.x = 1 if velocity.x < 0 else -1
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue