1
Fork 0
mirror of https://github.com/Steffo99/looping-for-loops.git synced 2024-11-21 15:44:24 +00:00

🚫 Remove autogenerated icons from buttons

This commit is contained in:
Steffo 2020-10-05 01:00:13 +02:00
parent 749bf49e9b
commit 55b1d94d01
3 changed files with 10 additions and 22 deletions

View file

@ -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"]

View file

@ -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")

View file

@ -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)