clegg
This commit is contained in:
commit
6a269eb236
97 changed files with 2137 additions and 0 deletions
12
objects/scoreitem/scoreitem.gd
Normal file
12
objects/scoreitem/scoreitem.gd
Normal file
|
@ -0,0 +1,12 @@
|
|||
extends Node2D
|
||||
|
||||
@export var score = 0
|
||||
const PARTICLES = preload("res://objects/scoreitem/scoreitem_particles.tscn")
|
||||
|
||||
func _on_area_2d_area_entered(area: Area2D) -> void:
|
||||
if area.is_in_group("player_hitbox"):
|
||||
GlobalFunctions.queue_score(score)
|
||||
var particles = PARTICLES.instantiate()
|
||||
particles.global_position = global_position
|
||||
get_owner().add_child(particles)
|
||||
queue_free()
|
Loading…
Add table
Add a link
Reference in a new issue