ajout du comportement d'activation de la musique
This commit is contained in:
@@ -1,13 +1,19 @@
|
||||
extends Resource
|
||||
class_name PlanetData
|
||||
|
||||
signal quota_number_updated(quota : int)
|
||||
signal contamination_updated(decontamination_surface : float)
|
||||
|
||||
const DEFAULT_CONTAMINATION_CENTRAL_ZONE_MAX_SIZE = 400.
|
||||
const DEFAULT_CONTAMINATION_CENTRAL_ZONE_MIN_SIZE = 100.
|
||||
const DEFAULT_BASE_SIZE = Vector2(2000,2000)
|
||||
|
||||
@export var base_size : Vector2 = Vector2(2000,2000)
|
||||
@export var contamination : TerrainData
|
||||
@export var quota_number : int = 0
|
||||
@export var quota_number : int = 0 :
|
||||
set(v):
|
||||
quota_number = v
|
||||
quota_number_updated.emit(v)
|
||||
|
||||
func _init(_base_size : Vector2 = DEFAULT_BASE_SIZE):
|
||||
base_size = _base_size
|
||||
@@ -17,6 +23,7 @@ func _init(_base_size : Vector2 = DEFAULT_BASE_SIZE):
|
||||
DEFAULT_CONTAMINATION_CENTRAL_ZONE_MIN_SIZE,
|
||||
base_size/2
|
||||
)
|
||||
contamination_updated.emit(get_decontamination_surface())
|
||||
|
||||
|
||||
func impact_contamination(position : Vector2, impact_radius : float, to_value : float = 1.):
|
||||
@@ -25,6 +32,7 @@ func impact_contamination(position : Vector2, impact_radius : float, to_value :
|
||||
impact_radius,
|
||||
to_value
|
||||
)
|
||||
contamination_updated.emit(get_decontamination_surface())
|
||||
|
||||
func is_in_base(point):
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user