forked from team-sg/hero-mark-2
killing is a messy business
This commit is contained in:
parent
19465f37ca
commit
a40347a52f
6 changed files with 39 additions and 1 deletions
|
@ -1024,6 +1024,7 @@ double_jump_force = 124.0
|
|||
|
||||
[node name="Sprite" type="Sprite" parent="Graphics"]
|
||||
unique_name_in_owner = true
|
||||
light_mask = 5
|
||||
material = SubResource( 1 )
|
||||
position = Vector2( 0, -10 )
|
||||
texture = ExtResource( 4 )
|
||||
|
|
16
objects/player/player_stain.gd
Normal file
16
objects/player/player_stain.gd
Normal file
|
@ -0,0 +1,16 @@
|
|||
extends Light2D
|
||||
|
||||
|
||||
export var lifetime: float = 5.0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
rotation = randf() * TAU
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
lifetime -= delta
|
||||
if lifetime < 0.5:
|
||||
scale = Vector2(lifetime * 2.0, lifetime * 2.0)
|
||||
if lifetime <= 0.0:
|
||||
queue_free()
|
10
objects/player/player_stain.tscn
Normal file
10
objects/player/player_stain.tscn
Normal file
|
@ -0,0 +1,10 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://graphics/particles/dust.png" type="Texture" id=1]
|
||||
[ext_resource path="res://objects/player/player_stain.gd" type="Script" id=2]
|
||||
|
||||
[node name="PlayerStain" type="Light2D"]
|
||||
texture = ExtResource( 1 )
|
||||
mode = 2
|
||||
range_item_cull_mask = 4
|
||||
script = ExtResource( 2 )
|
Loading…
Add table
Add a link
Reference in a new issue