remove evil bad thing

This commit is contained in:
zoe 2021-09-14 12:25:28 +02:00
parent 81bc9fa37f
commit f2cb94d4e3
4 changed files with 0 additions and 128 deletions

View file

@ -1,63 +0,0 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://Ball/sprite.png" type="Texture" id=1]
[ext_resource path="res://Ball/Ball.gd" type="Script" id=2]
[ext_resource path="res://Ball/Ball.tres" type="PhysicsMaterial" id=3]
[ext_resource path="res://Ball/BallCollision.tscn" type="PackedScene" id=4]
[sub_resource type="Animation" id=1]
resource_name = "reset"
length = 1.5
step = 0.05
tracks/0/type = "method"
tracks/0/path = NodePath(".")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 1.5 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [ ],
"method": "reset_done"
} ]
}
tracks/1/type = "bezier"
tracks/1/path = NodePath("Sprite:position:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"points": PoolRealArray( -10, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0 ),
"times": PoolRealArray( 0, 1.5 )
}
[node name="Ball" type="RigidBody2D"]
collision_layer = 4
mass = 90.0
physics_material_override = ExtResource( 3 )
continuous_cd = 2
contacts_reported = 4
contact_monitor = true
linear_velocity = Vector2( 0, -10 )
script = ExtResource( 2 )
[node name="CameraTransform" type="RemoteTransform2D" parent="."]
remote_path = NodePath("../../../Camera2D")
[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 0, -10 )
texture = ExtResource( 1 )
[node name="BallCollision" parent="." instance=ExtResource( 4 )]
visible = true
[node name="TrajectoryTimer" type="Timer" parent="."]
wait_time = 0.1
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/reset = SubResource( 1 )
[connection signal="timeout" from="TrajectoryTimer" to="." method="_on_TrajectoryTimer_timeout"]

View file

@ -1,18 +0,0 @@
extends Node2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
$Green.emitting = true
$Yellow.emitting = true
$Pink.emitting = true
$AnimationPlayer.play("+1Ball")
func _on_KillTimer_timeout():
queue_free()

View file

@ -1,12 +0,0 @@
extends Sprite
func _ready():
var _balls_connection = GameStats.connect("balls_changed", self, "set_balls")
set_balls()
func set_balls():
if GameStats.balls_left >= 1:
var old_region_size = get_region_rect().size.y
var new_region = Rect2(0, 0, old_region_size * GameStats.balls_left - old_region_size, old_region_size)
set_region_rect(new_region)
else: set_region_rect(Rect2(0,0,0,0))

View file

@ -1,35 +0,0 @@
extends Node
signal balls_changed()
var max_balls = 2
var balls_left
var pinks_left = 0
var level_won = false
var current_stage = "res://Stages/EmptyStage.tscn"
func add_balls(balls):
balls_left += balls
decide_game()
emit_signal("balls_changed")
func decide_game():
# game is won
if (pinks_left <= 0):
var main = get_tree().current_scene
var Winscreen = preload("res://Menu/WinScreen.tscn")
var winscreen = Winscreen.instance()
main.add_child(winscreen)
# game is lost
elif (balls_left <= 0):
restart_level()
func restart_level():
pinks_left = 0
level_won = false
var main = get_tree().current_scene
var Fadeout = load("res://Effects/FadeOut.tscn")
var fadeout = Fadeout.instance()
fadeout.scene_to_load = current_stage
main.add_child(fadeout)