ajout des graines procédurales et des cinamatiques

This commit is contained in:
2026-02-21 14:29:36 +01:00
parent 2e4a1bab53
commit ca0133bd71
117 changed files with 1238 additions and 590 deletions

View File

@@ -6,6 +6,7 @@ const SIGNAL_DURATION = 1
const PARTICLES_DISTANCE = 100
const DEFAULT_ICON = preload("res://common/icons/north-star.svg")
const ENERGY_ICON = preload("res://common/icons/bolt.svg")
const DOOR_ICON = preload("res://common/icons/logout.svg")
var started_time = 0.
var signals : Array[DetectorSignalIndividual] = []
@@ -15,15 +16,19 @@ var signals : Array[DetectorSignalIndividual] = []
func _init(region : Region, pos : Vector2):
for e in region.entity_container.get_children():
if e is TruckRecharge:
print(pos)
print(e.global_position)
print(e.global_position.angle_to(pos))
signals.append(
DetectorSignalIndividual.new(
(pos - e.global_position).normalized().angle(),
ENERGY_ICON
)
)
if e is Door and e.available and e.visible:
signals.append(
DetectorSignalIndividual.new(
(pos - e.global_position).normalized().angle(),
DOOR_ICON
)
)
func _draw():
if started_time < SIGNAL_DURATION: