From 55b1d94d01209085786453fa3944a2d8a0296072 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 5 Oct 2020 01:00:13 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=AB=20Remove=20autogenerated=20icons?= =?UTF-8?q?=20from=20buttons?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Objects/Main.tscn | 19 ++++++++----------- .../Buttons/GameButtonChain.gd | 7 ------- Objects/ScrollingObjects/Laser.gd | 6 ++---- 3 files changed, 10 insertions(+), 22 deletions(-) diff --git a/Objects/Main.tscn b/Objects/Main.tscn index 4d1c3c4..f131899 100644 --- a/Objects/Main.tscn +++ b/Objects/Main.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=12 format=2] +[gd_scene load_steps=11 format=2] [ext_resource path="res://Objects/SpecialObjects/Player.tscn" type="PackedScene" id=1] [ext_resource path="res://Objects/SpecialObjects/Conductor.tscn" type="PackedScene" id=2] @@ -9,7 +9,6 @@ [ext_resource path="res://Objects/ScrollingObjects/Loop.tscn" type="PackedScene" id=7] [ext_resource path="res://Objects/ScrollingObjects/Buttons/GameButton.tscn" type="PackedScene" id=8] [ext_resource path="res://Objects/ScrollingObjects/Buttons/GameButtonChain.tscn" type="PackedScene" id=9] -[ext_resource path="res://Objects/ScrollingObjects/Buttons/CBSpeedChangeButton.tscn" type="PackedScene" id=10] [ext_resource path="res://Objects/ScrollingObjects/Laser.tscn" type="PackedScene" id=11] [node name="Main" type="Node2D"] @@ -79,22 +78,20 @@ position = Vector2( 1380, 640 ) position = Vector2( 1440, 640 ) [node name="GameButtonChain" parent="." instance=ExtResource( 9 )] -position = Vector2( 560, 480 ) +position = Vector2( 1160, 480 ) [node name="GameButton" parent="GameButtonChain" instance=ExtResource( 8 )] -position = Vector2( 40, 0 ) [node name="GameButton2" parent="GameButtonChain" instance=ExtResource( 8 )] -position = Vector2( 100, 0 ) +position = Vector2( 40, 0 ) [node name="GameButton3" parent="GameButtonChain" instance=ExtResource( 8 )] -position = Vector2( 160, 0 ) +position = Vector2( 80, 0 ) -[node name="CBSpeedChangeButton" parent="GameButtonChain" instance=ExtResource( 10 )] -position = Vector2( 280, 0 ) - -[node name="Laser" parent="." instance=ExtResource( 11 )] -position = Vector2( 486, 500 ) +[node name="GameButton4" parent="GameButtonChain" instance=ExtResource( 8 )] +position = Vector2( 120, 0 ) +color = Color( 0.956863, 0.196078, 0.0941176, 1 ) [node name="Laser2" parent="." instance=ExtResource( 11 )] position = Vector2( 640, 300 ) +[connection signal="clicked" from="GameButtonChain/GameButton4" to="Laser2" method="deactivate"] diff --git a/Objects/ScrollingObjects/Buttons/GameButtonChain.gd b/Objects/ScrollingObjects/Buttons/GameButtonChain.gd index 0ddfef3..4865c60 100644 --- a/Objects/ScrollingObjects/Buttons/GameButtonChain.gd +++ b/Objects/ScrollingObjects/Buttons/GameButtonChain.gd @@ -1,11 +1,5 @@ extends Node2D -var chain_icons: Array = [ - null, - null, - null, -] - func _ready(): var children: Array = get_children() @@ -15,5 +9,4 @@ func _ready(): else: children[i].set_active(false) if i < len(children) - 1: - children[i].set_icon(chain_icons[i]) children[i].connect("clicked", children[i+1], "activate") diff --git a/Objects/ScrollingObjects/Laser.gd b/Objects/ScrollingObjects/Laser.gd index c9c1cda..eb60898 100644 --- a/Objects/ScrollingObjects/Laser.gd +++ b/Objects/ScrollingObjects/Laser.gd @@ -10,10 +10,8 @@ func _ready(): func set_active(value): is_active = value - if value: - $Gun.visible = true - else: - $Gun.visible = false + $Beam.visible = value + $Beam/RecreatingRectangleShape.disabled = not value func activate(): set_active(true)