merge commit

This commit is contained in:
Hurlu 2020-04-05 10:49:18 +02:00
commit 0a42af32e6
6 changed files with 10 additions and 18 deletions

View File

@ -8,6 +8,7 @@ position = Vector2( 458.947, 226.316 )
script = ExtResource( 1 )
[node name="Sprite" type="Sprite" parent="."]
z_index = 3
texture = ExtResource( 2 )
[node name="Area2D" type="Area2D" parent="."]

View File

@ -24,15 +24,16 @@ __meta__ = {
}
[node name="HBoxContainer" type="HBoxContainer" parent="Sprite/MarginContainer"]
margin_left = 674.0
margin_top = 771.0
margin_right = 902.0
margin_left = 788.0
margin_top = 835.0
margin_right = 788.0
margin_bottom = 835.0
size_flags_horizontal = 4
size_flags_vertical = 12
custom_constants/separation = 100
[node name="StartGameButton" type="TextureButton" parent="Sprite/MarginContainer/HBoxContainer"]
visible = false
margin_right = 64.0
margin_bottom = 64.0
size_flags_horizontal = 4
@ -40,8 +41,8 @@ size_flags_vertical = 8
texture_normal = ExtResource( 3 )
[node name="QuitGameButton" type="TextureButton" parent="Sprite/MarginContainer/HBoxContainer"]
margin_left = 164.0
margin_right = 228.0
visible = false
margin_right = 64.0
margin_bottom = 64.0
texture_normal = ExtResource( 3 )
[connection signal="pressed" from="Sprite/MarginContainer/HBoxContainer/StartGameButton" to="." method="_on_StartGameButton_pressed"]

View File

@ -4,19 +4,13 @@ onready var spawnPoints = get_tree().get_nodes_in_group("spawn_point")
var bucket = load("res://Scene/Clopinette.tscn")
var scripts = ["res://Scripts/PaintEffects/ConfuseDirections.gd",
"res://Scripts/PaintEffects/Downscale.gd",
"res://Scripts/PaintEffects/Invisibility.gd",
"res://Scripts/PaintEffects/Slippery.gd",
"res://Scripts/PaintEffects/Upscale.gd"]
func spawnBucket():
var newBucket = bucket.instance()
var newBucket = bucket.instance()
self.get_parent().add_child(newBucket)
newBucket.add_to_group("bucket")
newBucket.set_position(spawnPoints[randi() % spawnPoints.size()].get_position())
func _process(delta):
func _process(_delta):
if get_tree().get_nodes_in_group("bucket").empty():
spawnBucket()

View File

@ -16,9 +16,6 @@ func SlipperyRoutine(player, delta):
player.FRICTION /= FrictionFactor
player.MAX_SPEED *= SpeedFactor
var sprite = player.get_node("Sprite")
var coll = player.get_node("CollisionShape2D")
while elapsed < SlipperyTime:
elapsed += yield()

View File

@ -74,7 +74,6 @@ func _physics_process(delta):
func updatePaintEffects(delta):
var sprite = get_node("Sprite")
var updated = []
for rout in coroutines:
if rout != null && rout.is_valid():

View File

@ -6,7 +6,7 @@ onready var quitGameButton = $Sprite/MarginContainer/HBoxContainer/QuitGameButto
func _ready():
startGameButton.grab_focus()
func _process(delta):
func _process(_delta):
if startGameButton.is_hovered():
startGameButton.grab_focus()
elif quitGameButton.is_hovered():