Merge branch 'main' of https://github.com/gotfishmakesticks/cosmic
This commit is contained in:
commit
ea4cc9ada1
6 changed files with 51 additions and 21 deletions
|
|
@ -12,6 +12,7 @@ var color_background
|
|||
@onready var enemy_faction = $EnemyFaction
|
||||
signal enemy_destroyed
|
||||
signal scene_ready
|
||||
signal updated_colors
|
||||
|
||||
func _ready():
|
||||
randomize()
|
||||
|
|
@ -97,6 +98,7 @@ func recolor():
|
|||
enemy_faction.changeitemscolor()
|
||||
bases.changeitemscolor()
|
||||
ship.changeinterfacecolor()
|
||||
updated_colors.emit()
|
||||
var menu = get_node_or_null("MainShip/GUI/StarterBaseMenu")
|
||||
if menu != null:
|
||||
menu.modulate = bases.modulate
|
||||
|
|
|
|||
11
scripts/nebula.gd
Normal file
11
scripts/nebula.gd
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
extends ColorRect
|
||||
|
||||
@onready var ship = get_tree().current_scene.get_node("MainShip")
|
||||
@onready var space = get_tree().current_scene
|
||||
|
||||
func _physics_process(_delta):
|
||||
material.set_shader_parameter("offset",ship.global_position)
|
||||
|
||||
|
||||
func _on_space_updated_colors():
|
||||
material.set_shader_parameter("nebula_color",space.color_background)
|
||||
Loading…
Add table
Add a link
Reference in a new issue