mirror of
https://github.com/Steffo99/swear-jar.git
synced 2024-11-22 23:54:21 +00:00
31 lines
699 B
GDScript3
31 lines
699 B
GDScript3
|
extends Area2D
|
||
|
class_name Evaluator
|
||
|
## aggiunge al totale i valori dei Valuable che ci body_enterano e sottrae quelli che ci body_exitano
|
||
|
|
||
|
|
||
|
## The current amount of value evaluated.
|
||
|
var total_value: int = 0
|
||
|
|
||
|
## The types of [Collectible]s to value.
|
||
|
##
|
||
|
## The strings will match only if exactly the same.
|
||
|
@export var collecting_types: Array[StringName]
|
||
|
|
||
|
## The collision mask to check colliding body against.
|
||
|
@export_flags_2d_physics var collecting_collision_mask: int
|
||
|
|
||
|
|
||
|
## The evaluator has added the value of an object.
|
||
|
signal added(what: PhysicsBody2D)
|
||
|
|
||
|
## The evaluator has removed the value of an object.
|
||
|
signal removed(what: PhysicsBody2D)
|
||
|
|
||
|
|
||
|
func _on_body_entered(body: Node2D):
|
||
|
pass
|
||
|
|
||
|
|
||
|
|
||
|
|