Color rework

This commit is contained in:
R34nd0 2024-01-14 14:42:23 +05:00
commit 2b527c9b2e
15 changed files with 73 additions and 16 deletions

View file

@ -36,7 +36,7 @@ func _process(_delta):
if hull.hp < 0: destroy()
func changeinterfacecolor():
$GUI/Interface.modulate = modulate
$GUI/Interface.modulate = material.get_shader_parameter('color')
func destroy():
hull.hp = hull.max_hp

View file

@ -7,7 +7,7 @@ extends Control
var markers = []
func _process(_delta):
$Sprite.self_modulate = ship.modulate
$Sprite.self_modulate = ship.material.get_shader_parameter('color')
func add_marker(target : Node, type : String):
var marker_inst = marker.instantiate()

View file

@ -22,4 +22,4 @@ func _process(_delta):
rotation = ship.global_position.angle_to_point(target.global_position)
var sp_scale = 1024 / clamp(ship.global_position.distance_to(target.global_position), 512, 2048)
marker.scale = Vector2(sp_scale, sp_scale)
modulate = target.modulate
modulate = target.material.get_shader_parameter("color")