forked from team-sg/hero-mark-2
robots have oil, not blood
This commit is contained in:
parent
fe09f34bf8
commit
5ffd99fb08
4 changed files with 18 additions and 3 deletions
|
@ -1,9 +1,22 @@
|
|||
extends Node2D
|
||||
|
||||
|
||||
func _ready():
|
||||
const BloodSpray := preload("res://objects/environment/blood/blood_spray.tscn")
|
||||
|
||||
|
||||
export var spray_ammount: int = 16
|
||||
export var spray_velocity: float = 80
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
$AnimatedSprite.playing = true
|
||||
|
||||
for i in spray_ammount:
|
||||
var spray = BloodSpray.instance()
|
||||
spray.color = Color(0x20223aff)
|
||||
spray.global_position = global_position
|
||||
spray.velocity = Vector2(randf() * spray_velocity, 0.0).rotated(randf() * TAU)
|
||||
get_parent().add_child(spray)
|
||||
|
||||
|
||||
func _on_AnimatedSprite_animation_finished():
|
||||
$AnimatedSprite.queue_free()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue