From 3dc2ae4dd2b4cc9a05b7089bcf91a3fd798dc639 Mon Sep 17 00:00:00 2001 From: Haze Weathers Date: Mon, 11 Mar 2024 15:47:37 -0400 Subject: [PATCH] fix arrow palette on boss hud --- objects/hud/hud_boss.gd | 2 ++ objects/hud/hud_boss.tscn | 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/objects/hud/hud_boss.gd b/objects/hud/hud_boss.gd index 487aa8e..6e145e8 100644 --- a/objects/hud/hud_boss.gd +++ b/objects/hud/hud_boss.gd @@ -19,6 +19,8 @@ export var song_name = "♫Music" export (Color) var bonus_color func _ready(): + var palette = load("res://graphics/player/palettes/%s.tex" % Game.current_palette) + $Arrow.material.set_shader_param("palette", palette) #Change graphics depending on if lives are on if Game.use_lives: $LivesHead.visible = true diff --git a/objects/hud/hud_boss.tscn b/objects/hud/hud_boss.tscn index 5007043..2f46821 100644 --- a/objects/hud/hud_boss.tscn +++ b/objects/hud/hud_boss.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=16 format=2] +[gd_scene load_steps=20 format=2] [ext_resource path="res://graphics/hud/stars_hud.png" type="Texture" id=1] [ext_resource path="res://graphics/hud/lives_head.png" type="Texture" id=2] @@ -12,6 +12,13 @@ [ext_resource path="res://ui/theme.tres" type="Theme" id=10] [ext_resource path="res://graphics/hud/oxygen.png" type="Texture" id=11] [ext_resource path="res://graphics/hud/oxygen_meter.png" type="Texture" id=12] +[ext_resource path="res://shaders/recolor.tres" type="Shader" id=13] +[ext_resource path="res://graphics/player/palettes/default.tex" type="Texture" id=14] +[ext_resource path="res://graphics/hud/hud_arrow.png" type="Texture" id=15] + +[sub_resource type="ShaderMaterial" id=4] +shader = ExtResource( 13 ) +shader_param/palette = ExtResource( 14 ) [sub_resource type="ShaderMaterial" id=1] @@ -58,6 +65,19 @@ texture = ExtResource( 5 ) position = Vector2( 9, 6 ) texture = ExtResource( 7 ) +[node name="Arrow" type="Sprite" parent="."] +material = SubResource( 4 ) +position = Vector2( 58, 6 ) +texture = ExtResource( 15 ) + +[node name="ArrowShade" type="Sprite" parent="Arrow"] +modulate = Color( 0.57, 0.57, 0.57, 1 ) +use_parent_material = true +position = Vector2( 0, 4 ) +texture = ExtResource( 15 ) +region_enabled = true +region_rect = Rect2( 0, 6, 5, 1 ) + [node name="RedStar" type="Sprite" parent="."] visible = false material = SubResource( 1 )