stained with your own blood?!?!?! LUDICROUS!!!

This commit is contained in:
Haze Weathers 2023-09-29 15:13:14 -04:00
parent a77860ca41
commit 1258a0e427
2 changed files with 3 additions and 1 deletions

View file

@ -6,6 +6,7 @@ const PlayerStain := preload("res://objects/player/player_stain.tscn")
export var color: Color = Color(0xf53342ff) export var color: Color = Color(0xf53342ff)
export var stains_player: bool = true
var velocity := Vector2.ZERO var velocity := Vector2.ZERO
@ -33,7 +34,7 @@ func _on_body_entered(body: Node) -> void:
queue_free() queue_free()
elif body is TileMap: elif body is TileMap:
queue_free() queue_free()
elif body.is_in_group("player"): elif stains_player and body.is_in_group("player"):
var stain = PlayerStain.instance() var stain = PlayerStain.instance()
stain.color = color stain.color = color
body.get_node("Graphics/Sprite").add_child(stain) body.get_node("Graphics/Sprite").add_child(stain)

View file

@ -282,6 +282,7 @@ func _on_Dead_state_entered() -> void:
Physics2DServer.set_active(true) Physics2DServer.set_active(true)
spray.global_position = death_splatter_position.global_position spray.global_position = death_splatter_position.global_position
spray.velocity = Vector2(randf() * 80.0, 0.0).rotated(randf() * TAU) spray.velocity = Vector2(randf() * 80.0, 0.0).rotated(randf() * TAU)
spray.stains_player = false
get_parent().add_child(spray) get_parent().add_child(spray)
else: else:
skip_blood = false skip_blood = false