From 29e74e34ca3c96559d097ee03506834adb9eef16 Mon Sep 17 00:00:00 2001 From: TechieDamien Date: Sat, 2 Aug 2025 18:48:10 +0100 Subject: [PATCH] Completes the rainbow (whoops) --- Scenes/main_menu.tscn | 18 +++++++++--------- Scripts/ouroboros.gd | 2 +- Scripts/snake_part.gd | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Scenes/main_menu.tscn b/Scenes/main_menu.tscn index c28319a..71a86db 100644 --- a/Scenes/main_menu.tscn +++ b/Scenes/main_menu.tscn @@ -23,15 +23,15 @@ font_color = Color(1, 1, 0, 1) [sub_resource type="LabelSettings" id="LabelSettings_opfnp"] font_size = 160 -font_color = Color(0, 0, 1, 1) +font_color = Color(0, 0.545, 0.545, 1) [sub_resource type="LabelSettings" id="LabelSettings_cp0ys"] font_size = 160 -font_color = Color(0.545098, 0, 0, 1) +font_color = Color(0.4, 0.2, 0.6, 1) [sub_resource type="LabelSettings" id="LabelSettings_yhxw7"] font_size = 160 -font_color = Color(1, 1, 0, 1) +font_color = Color(1, 0.270588, 0, 1) [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_trj04"] bg_color = Color(0, 0, 0, 1) @@ -126,7 +126,7 @@ texture = ExtResource("3_ce3w2") script = ExtResource("4_n45e2") [node name="Ouroboros3" type="Sprite2D" parent="Title"] -modulate = Color(0.4, 0.2, 0.6, 1) +modulate = Color(0, 0, 1, 1) material = ExtResource("3_t1dhk") position = Vector2(776, 178) scale = Vector2(0.5, 0.5) @@ -134,7 +134,7 @@ texture = ExtResource("3_ce3w2") script = ExtResource("4_n45e2") [node name="Ouroboros4" type="Sprite2D" parent="Title"] -modulate = Color(1, 0.270588, 0, 1) +modulate = Color(0.545098, 0, 0, 1) material = ExtResource("3_t1dhk") position = Vector2(947, 181) scale = Vector2(0.5, 0.5) @@ -161,10 +161,10 @@ label_settings = SubResource("LabelSettings_n45e2") [node name="Label2" type="Label" parent="Title"] layout_mode = 0 -offset_left = 631.0 -offset_top = 66.0 -offset_right = 731.0 -offset_bottom = 290.0 +offset_left = 642.0 +offset_top = 69.0 +offset_right = 742.0 +offset_bottom = 293.0 text = "b" label_settings = SubResource("LabelSettings_opfnp") diff --git a/Scripts/ouroboros.gd b/Scripts/ouroboros.gd index f6f6050..0a541dc 100644 --- a/Scripts/ouroboros.gd +++ b/Scripts/ouroboros.gd @@ -7,6 +7,6 @@ var last_rotation_mult = 1 func _process(delta: float) -> void: var head = get_tree().get_first_node_in_group("Head") if head is SnakePart: - modulate = head.COLOURS[head.colour_index] + modulate = head.COLOURS[[head.colour_index % len(head.COLOURS)]] last_rotation_mult = head.colour_index + 1 rotate(delta * ROTATION_SPEED * last_rotation_mult) diff --git a/Scripts/snake_part.gd b/Scripts/snake_part.gd index d0c0618..703feab 100644 --- a/Scripts/snake_part.gd +++ b/Scripts/snake_part.gd @@ -4,7 +4,7 @@ class_name SnakePart const TILE_SIZE = 40 enum PartTypes {HEAD, BODY, TAIL} enum States {ALIVE, DEAD, OUROBOROS, OLD_OUROBOROS} -const COLOURS = [Color.DARK_RED, Color.ORANGE_RED, Color.YELLOW, Color.WEB_GREEN, Color.BLUE, Color.REBECCA_PURPLE] +const COLOURS = [Color.DARK_RED, Color.ORANGE_RED, Color.YELLOW, Color.WEB_GREEN, Color.DARK_CYAN, Color.BLUE, Color.REBECCA_PURPLE] var part_type : PartTypes = PartTypes.HEAD var state : States = States.ALIVE @@ -214,7 +214,7 @@ func process_movement(new_direction : Vector2, prevent_movment : bool = false) - func update_sprite() -> void: - sprite.modulate = COLOURS[colour_index] + sprite.modulate = COLOURS[colour_index % len(COLOURS)] # Set the sprite based on state and part type match part_type: