diff --git a/levels/base_level.tscn b/levels/base_level.tscn index 5c3e251..5bfdeab 100644 --- a/levels/base_level.tscn +++ b/levels/base_level.tscn @@ -6,6 +6,9 @@ [ext_resource type="Script" uid="uid://da57frm5l63c8" path="res://levels/results_screen.gd" id="4_satuh"] [ext_resource type="Theme" uid="uid://bqs58u70wa6gd" path="res://parking_citation.tres" id="5_46036"] [ext_resource type="Texture2D" uid="uid://bqtkxrfh5yyfn" path="res://ui/vecteezy_crumpled-paper-texture_1227306.jpg" id="6_maq6b"] +[ext_resource type="Shader" uid="uid://cgrk2eiljt4v1" path="res://levels/greyscale.gdshader" id="7_maq6b"] +[ext_resource type="Script" uid="uid://ck0331hehsf3n" path="res://levels/death_animation.gd" id="9_n8wy4"] +[ext_resource type="Script" uid="uid://bm3t2dcw4e32i" path="res://levels/timescale_node.gd" id="10_dx6c5"] [sub_resource type="NavigationMesh" id="NavigationMesh_4y4yw"] vertices = PackedVector3Array(-24, 0.4634713, -13, -19.25, 0.4634713, -13, -17.75, 0.4634713, -13.75, -24, 0.4634713, -36.5, -5, 0.4634713, -13.75, -4.75, 0.4634713, -36.5, -2.75, 0.4634713, -13.5, -2, 0.4634713, -12.75, 1.5, 0.4634713, -12.75, 2.25, 0.4634713, -13.5, 4.5, 0.4634713, -13.75, 4.25, 0.4634713, -36.5, 19, 0.4634713, -12.75, 19, 0.4634713, -10.75, 24, 0.4634713, -10.75, 18.25, 0.4634713, -13.5, 24, 0.4634713, -36.5, -19.75, 0.4634713, -6.5, -19.25, 0.4634713, -6.75, -19.25, 0.4634713, -8.5, -19.75, 0.4634713, -8.75, -19.75, 0.4634713, -9.5, -19.25, 0.4634713, -9.75, -19.25, 0.4634713, -11.5, -19.75, 0.4634713, -11.75, -24, 0.4634713, -4.25, -19.75, 0.4634713, -12.5, -19.25, 0.4634713, -4.5, 1.25, 0.4634713, -6.5, 1.75, 0.4634713, -6.75, 1.75, 0.4634713, -8.5, 1.25, 0.4634713, -8.75, 1.25, 0.4634713, -9.5, 1.75, 0.4634713, -9.75, 1.75, 0.4634713, -11.5, 1.25, 0.4634713, -11.75, -2, 0.4634713, -4.75, 1.75, 0.4634713, -5, 1.25, 0.4634713, -5.75, -17.25, 5.4634714, -11.5, -17.25, 5.4634714, -4.25, -4, 5.4634714, -4.25, -4, 5.4634714, -11.5, 3.75, 5.4634714, -11.5, 3.75, 5.4634714, -4.25, 17, 5.4634714, -4.25, 17, 5.4634714, -11.5, -17, 0.9634713, -11.25, -17, 0.9634713, -10.5, -16.25, 0.9634713, -10.5, -16.25, 1.2134713, -11.25, -14, 0.9634713, -11.25, -14, 0.9634713, -10.5, -13.25, 0.9634713, -10.5, -13.25, 1.2134713, -11.25, -11, 0.9634713, -11.25, -11, 0.9634713, -10.5, -10.25, 0.9634713, -10.5, -10.25, 1.2134713, -11.25, -8, 0.9634713, -11.25, -8, 0.9634713, -10.5, -7.25, 0.9634713, -10.5, -7.25, 1.2134713, -11.25, -5, 0.9634713, -11.25, -5, 0.9634713, -10.5, -4.25, 0.9634713, -10.5, -4.25, 1.2134713, -11.25, 4, 0.9634713, -11.25, 4, 0.9634713, -10.5, 4.75, 0.9634713, -10.5, 4.75, 1.2134713, -11.25, 7, 0.9634713, -11.25, 7, 0.9634713, -10.5, 7.75, 0.9634713, -10.5, 7.75, 1.2134713, -11.25, 10, 0.9634713, -11.25, 10, 0.9634713, -10.5, 10.75, 0.9634713, -10.5, 10.75, 1.2134713, -11.25, 13, 0.9634713, -11.25, 13, 0.9634713, -10.5, 13.75, 0.9634713, -10.5, 13.75, 1.2134713, -11.25, 16, 0.9634713, -11.25, 16, 0.9634713, -10.5, 16.75, 0.9634713, -10.5, 16.75, 1.2134713, -11.25, 19, 0.4634713, -5, 24, 0.4634713, -5, -17, 0.9634713, -8.25, -17, 0.9634713, -7.5, -16.25, 0.9634713, -7.5, -16.25, 1.2134713, -8.25, -14, 0.9634713, -8.25, -14, 0.9634713, -7.5, -13.25, 0.9634713, -7.5, -13.25, 1.2134713, -8.25, -11, 0.9634713, -8.25, -11, 0.9634713, -7.5, -10.25, 0.9634713, -7.5, -10.25, 1.2134713, -8.25, -8, 0.9634713, -8.25, -8, 0.9634713, -7.5, -7.25, 0.9634713, -7.5, -7.25, 1.2134713, -8.25, -5, 0.9634713, -8.25, -5, 0.9634713, -7.5, -4.25, 0.9634713, -7.5, -4.25, 1.2134713, -8.25, 4, 0.9634713, -8.25, 4, 0.9634713, -7.5, 4.75, 0.9634713, -7.5, 4.75, 1.2134713, -8.25, 7, 0.9634713, -8.25, 7, 0.9634713, -7.5, 7.75, 0.9634713, -7.5, 7.75, 1.2134713, -8.25, 10, 0.9634713, -8.25, 10, 0.9634713, -7.5, 10.75, 0.9634713, -7.5, 10.75, 1.2134713, -8.25, 13, 0.9634713, -8.25, 13, 0.9634713, -7.5, 13.75, 0.9634713, -7.5, 13.75, 1.2134713, -8.25, 16, 0.9634713, -8.25, 16, 0.9634713, -7.5, 16.75, 0.9634713, -7.5, 16.75, 1.2134713, -8.25, -17, 0.9634713, -5.25, -17, 0.9634713, -4.5, -16.25, 0.9634713, -4.5, -16.25, 1.2134713, -5.25, -14, 0.9634713, -5.25, -14, 0.9634713, -4.5, -13.25, 0.9634713, -4.5, -13.25, 1.2134713, -5.25, -11, 0.9634713, -5.25, -11, 0.9634713, -4.5, -10.25, 0.9634713, -4.5, -10.25, 1.2134713, -5.25, -8, 0.9634713, -5.25, -8, 0.9634713, -4.5, -7.25, 0.9634713, -4.5, -7.25, 1.2134713, -5.25, -5, 0.9634713, -5.25, -5, 0.9634713, -4.5, -4.25, 0.9634713, -4.5, -4.25, 1.2134713, -5.25, 4, 0.9634713, -5.25, 4, 0.9634713, -4.5, 4.75, 0.9634713, -4.5, 4.75, 1.2134713, -5.25, 7, 0.9634713, -5.25, 7, 0.9634713, -4.5, 7.75, 0.9634713, -4.5, 7.75, 1.2134713, -5.25, 10, 0.9634713, -5.25, 10, 0.9634713, -4.5, 10.75, 0.9634713, -4.5, 10.75, 1.2134713, -5.25, 13, 0.9634713, -5.25, 13, 0.9634713, -4.5, 13.75, 0.9634713, -4.5, 13.75, 1.2134713, -5.25, 16, 0.9634713, -5.25, 16, 0.9634713, -4.5, 16.75, 0.9634713, -4.5, 16.75, 1.2134713, -5.25, 18.25, 0.4634713, -2.25, 16.5, 0.4634713, -2.25, 16.5, 0.4634713, 1.25, 18.25, 0.4634713, 1.5, 19, 0.4634713, 2.25, 19, 0.4634713, 4.25, 24, 0.4634713, 4.25, 19, 0.4634713, -3, 2.25, 0.4634713, 1.5, 3, 0.4634713, 1.5, 3, 0.4634713, -2, -2.75, 0.4634713, -2.25, -4.5, 0.4634713, -2.25, -4.5, 0.4634713, 1.25, -2.75, 0.4634713, 1.5, 1.5, 0.4634713, 2.25, 1.75, 0.4634713, -3, -2, 0.4634713, -3, -2, 0.4634713, 2.25, -19.25, 0.4634713, 2, -18, 0.4634713, 1.5, -18, 0.4634713, -2, -19.25, 0.4634713, -3, -24, 0.4634713, 2, -19.75, 0.4634713, 8.5, -19.25, 0.4634713, 8.25, -19.25, 0.4634713, 6.5, -19.75, 0.4634713, 6.25, -19.75, 0.4634713, 5.5, -19.25, 0.4634713, 5.25, -19.25, 0.4634713, 3.5, -19.75, 0.4634713, 3.25, -24, 0.4634713, 10.75, -19.75, 0.4634713, 2.5, -19.25, 0.4634713, 10.5, 1.25, 0.4634713, 8.5, 1.75, 0.4634713, 8.25, 1.75, 0.4634713, 6.5, 1.25, 0.4634713, 6.25, 1.25, 0.4634713, 5.5, 1.75, 0.4634713, 5.25, 1.75, 0.4634713, 3.5, 1.25, 0.4634713, 3.25, -2, 0.4634713, 10.25, 1.75, 0.4634713, 10, 1.25, 0.4634713, 9.25, -17.25, 5.4634714, 3.5, -17.25, 5.4634714, 10.75, -4, 5.4634714, 10.75, -4, 5.4634714, 3.5, 3.75, 5.4634714, 3.5, 3.75, 5.4634714, 10.75, 17, 5.4634714, 10.75, 17, 5.4634714, 3.5, -17, 0.9634713, 3.75, -17, 0.9634713, 4.5, -16.25, 0.9634713, 4.5, -16.25, 1.2134713, 3.75, -14, 0.9634713, 3.75, -14, 0.9634713, 4.5, -13.25, 0.9634713, 4.5, -13.25, 1.2134713, 3.75, -11, 0.9634713, 3.75, -11, 0.9634713, 4.5, -10.25, 0.9634713, 4.5, -10.25, 1.2134713, 3.75, -8, 0.9634713, 3.75, -8, 0.9634713, 4.5, -7.25, 0.9634713, 4.5, -7.25, 1.2134713, 3.75, -5, 0.9634713, 3.75, -5, 0.9634713, 4.5, -4.25, 0.9634713, 4.5, -4.25, 1.2134713, 3.75, 4, 0.9634713, 3.75, 4, 0.9634713, 4.5, 4.75, 0.9634713, 4.5, 4.75, 1.2134713, 3.75, 7, 0.9634713, 3.75, 7, 0.9634713, 4.5, 7.75, 0.9634713, 4.5, 7.75, 1.2134713, 3.75, 10, 0.9634713, 3.75, 10, 0.9634713, 4.5, 10.75, 0.9634713, 4.5, 10.75, 1.2134713, 3.75, 13, 0.9634713, 3.75, 13, 0.9634713, 4.5, 13.75, 0.9634713, 4.5, 13.75, 1.2134713, 3.75, 16, 0.9634713, 3.75, 16, 0.9634713, 4.5, 16.75, 0.9634713, 4.5, 16.75, 1.2134713, 3.75, 19, 0.4634713, 10, 24, 0.4634713, 10, -17, 0.9634713, 6.75, -17, 0.9634713, 7.5, -16.25, 0.9634713, 7.5, -16.25, 1.2134713, 6.75, -14, 0.9634713, 6.75, -14, 0.9634713, 7.5, -13.25, 0.9634713, 7.5, -13.25, 1.2134713, 6.75, -11, 0.9634713, 6.75, -11, 0.9634713, 7.5, -10.25, 0.9634713, 7.5, -10.25, 1.2134713, 6.75, -8, 0.9634713, 6.75, -8, 0.9634713, 7.5, -7.25, 0.9634713, 7.5, -7.25, 1.2134713, 6.75, -5, 0.9634713, 6.75, -5, 0.9634713, 7.5, -4.25, 0.9634713, 7.5, -4.25, 1.2134713, 6.75, 4, 0.9634713, 6.75, 4, 0.9634713, 7.5, 4.75, 0.9634713, 7.5, 4.75, 1.2134713, 6.75, 7, 0.9634713, 6.75, 7, 0.9634713, 7.5, 7.75, 0.9634713, 7.5, 7.75, 1.2134713, 6.75, 10, 0.9634713, 6.75, 10, 0.9634713, 7.5, 10.75, 0.9634713, 7.5, 10.75, 1.2134713, 6.75, 13, 0.9634713, 6.75, 13, 0.9634713, 7.5, 13.75, 0.9634713, 7.5, 13.75, 1.2134713, 6.75, 16, 0.9634713, 6.75, 16, 0.9634713, 7.5, 16.75, 0.9634713, 7.5, 16.75, 1.2134713, 6.75, -17, 0.9634713, 9.75, -17, 0.9634713, 10.5, -16.25, 0.9634713, 10.5, -16.25, 1.2134713, 9.75, -14, 0.9634713, 9.75, -14, 0.9634713, 10.5, -13.25, 0.9634713, 10.5, -13.25, 1.2134713, 9.75, -11, 0.9634713, 9.75, -11, 0.9634713, 10.5, -10.25, 0.9634713, 10.5, -10.25, 1.2134713, 9.75, -8, 0.9634713, 9.75, -8, 0.9634713, 10.5, -7.25, 0.9634713, 10.5, -7.25, 1.2134713, 9.75, -5, 0.9634713, 9.75, -5, 0.9634713, 10.5, -4.25, 0.9634713, 10.5, -4.25, 1.2134713, 9.75, 4, 0.9634713, 9.75, 4, 0.9634713, 10.5, 4.75, 0.9634713, 10.5, 4.75, 1.2134713, 9.75, 7, 0.9634713, 9.75, 7, 0.9634713, 10.5, 7.75, 0.9634713, 10.5, 7.75, 1.2134713, 9.75, 10, 0.9634713, 9.75, 10, 0.9634713, 10.5, 10.75, 0.9634713, 10.5, 10.75, 1.2134713, 9.75, 13, 0.9634713, 9.75, 13, 0.9634713, 10.5, 13.75, 0.9634713, 10.5, 13.75, 1.2134713, 9.75, 16, 0.9634713, 9.75, 16, 0.9634713, 10.5, 16.75, 0.9634713, 10.5, 16.75, 1.2134713, 9.75, 18.25, 0.4634713, 12.75, 16.5, 0.4634713, 12.75, 16.5, 0.4634713, 16.25, 18.25, 0.4634713, 16.5, 19, 0.4634713, 17.25, 19, 0.4634713, 19.25, 24, 0.4634713, 19.25, 19, 0.4634713, 12, 2.25, 0.4634713, 16.5, 3, 0.4634713, 16.5, 3, 0.4634713, 13, -2.75, 0.4634713, 12.75, -4.5, 0.4634713, 12.75, -4.5, 0.4634713, 16.25, -2.75, 0.4634713, 16.5, 1.5, 0.4634713, 17.25, 1.75, 0.4634713, 12, -2, 0.4634713, 12, -2, 0.4634713, 17.25, -19.25, 0.4634713, 17, -18, 0.4634713, 16.5, -18, 0.4634713, 13, -19.25, 0.4634713, 12, -24, 0.4634713, 17, -19.75, 0.4634713, 23.5, -19.25, 0.4634713, 23.25, -19.25, 0.4634713, 21.5, -19.75, 0.4634713, 21.25, -19.75, 0.4634713, 20.5, -19.25, 0.4634713, 20.25, -19.25, 0.4634713, 18.5, -19.75, 0.4634713, 18.25, -24, 0.4634713, 25.75, -19.75, 0.4634713, 17.5, -19.25, 0.4634713, 25.5, 1.25, 0.4634713, 23.5, 1.75, 0.4634713, 23.25, 1.75, 0.4634713, 21.5, 1.25, 0.4634713, 21.25, 1.25, 0.4634713, 20.5, 1.75, 0.4634713, 20.25, 1.75, 0.4634713, 18.5, 1.25, 0.4634713, 18.25, -2, 0.4634713, 25.25, 1.75, 0.4634713, 25, 1.25, 0.4634713, 24.25, -17.25, 5.4634714, 18.5, -17.25, 5.4634714, 25.75, -4, 5.4634714, 25.75, -4, 5.4634714, 18.5, 3.75, 5.4634714, 18.5, 3.75, 5.4634714, 25.75, 17, 5.4634714, 25.75, 17, 5.4634714, 18.5, -17, 0.9634713, 18.75, -17, 0.9634713, 19.5, -16.25, 0.9634713, 19.5, -16.25, 1.2134713, 18.75, -14, 0.9634713, 18.75, -14, 0.9634713, 19.5, -13.25, 0.9634713, 19.5, -13.25, 1.2134713, 18.75, -11, 0.9634713, 18.75, -11, 0.9634713, 19.5, -10.25, 0.9634713, 19.5, -10.25, 1.2134713, 18.75, -8, 0.9634713, 18.75, -8, 0.9634713, 19.5, -7.25, 0.9634713, 19.5, -7.25, 1.2134713, 18.75, -5, 0.9634713, 18.75, -5, 0.9634713, 19.5, -4.25, 0.9634713, 19.5, -4.25, 1.2134713, 18.75, 4, 0.9634713, 18.75, 4, 0.9634713, 19.5, 4.75, 0.9634713, 19.5, 4.75, 1.2134713, 18.75, 7, 0.9634713, 18.75, 7, 0.9634713, 19.5, 7.75, 0.9634713, 19.5, 7.75, 1.2134713, 18.75, 10, 0.9634713, 18.75, 10, 0.9634713, 19.5, 10.75, 0.9634713, 19.5, 10.75, 1.2134713, 18.75, 13, 0.9634713, 18.75, 13, 0.9634713, 19.5, 13.75, 0.9634713, 19.5, 13.75, 1.2134713, 18.75, 16, 0.9634713, 18.75, 16, 0.9634713, 19.5, 16.75, 0.9634713, 19.5, 16.75, 1.2134713, 18.75, 19, 0.4634713, 25, 24, 0.4634713, 25, -17, 0.9634713, 21.75, -17, 0.9634713, 22.5, -16.25, 0.9634713, 22.5, -16.25, 1.2134713, 21.75, -14, 0.9634713, 21.75, -14, 0.9634713, 22.5, -13.25, 0.9634713, 22.5, -13.25, 1.2134713, 21.75, -11, 0.9634713, 21.75, -11, 0.9634713, 22.5, -10.25, 0.9634713, 22.5, -10.25, 1.2134713, 21.75, -8, 0.9634713, 21.75, -8, 0.9634713, 22.5, -7.25, 0.9634713, 22.5, -7.25, 1.2134713, 21.75, -5, 0.9634713, 21.75, -5, 0.9634713, 22.5, -4.25, 0.9634713, 22.5, -4.25, 1.2134713, 21.75, 4, 0.9634713, 21.75, 4, 0.9634713, 22.5, 4.75, 0.9634713, 22.5, 4.75, 1.2134713, 21.75, 7, 0.9634713, 21.75, 7, 0.9634713, 22.5, 7.75, 0.9634713, 22.5, 7.75, 1.2134713, 21.75, 10, 0.9634713, 21.75, 10, 0.9634713, 22.5, 10.75, 0.9634713, 22.5, 10.75, 1.2134713, 21.75, 13, 0.9634713, 21.75, 13, 0.9634713, 22.5, 13.75, 0.9634713, 22.5, 13.75, 1.2134713, 21.75, 16, 0.9634713, 21.75, 16, 0.9634713, 22.5, 16.75, 0.9634713, 22.5, 16.75, 1.2134713, 21.75, -17, 0.9634713, 24.75, -17, 0.9634713, 25.5, -16.25, 0.9634713, 25.5, -16.25, 1.2134713, 24.75, -14, 0.9634713, 24.75, -14, 0.9634713, 25.5, -13.25, 0.9634713, 25.5, -13.25, 1.2134713, 24.75, -11, 0.9634713, 24.75, -11, 0.9634713, 25.5, -10.25, 0.9634713, 25.5, -10.25, 1.2134713, 24.75, -8, 0.9634713, 24.75, -8, 0.9634713, 25.5, -7.25, 0.9634713, 25.5, -7.25, 1.2134713, 24.75, -5, 0.9634713, 24.75, -5, 0.9634713, 25.5, -4.25, 0.9634713, 25.5, -4.25, 1.2134713, 24.75, 4, 0.9634713, 24.75, 4, 0.9634713, 25.5, 4.75, 0.9634713, 25.5, 4.75, 1.2134713, 24.75, 7, 0.9634713, 24.75, 7, 0.9634713, 25.5, 7.75, 0.9634713, 25.5, 7.75, 1.2134713, 24.75, 10, 0.9634713, 24.75, 10, 0.9634713, 25.5, 10.75, 0.9634713, 25.5, 10.75, 1.2134713, 24.75, 13, 0.9634713, 24.75, 13, 0.9634713, 25.5, 13.75, 0.9634713, 25.5, 13.75, 1.2134713, 24.75, 16, 0.9634713, 24.75, 16, 0.9634713, 25.5, 16.75, 0.9634713, 25.5, 16.75, 1.2134713, 24.75, 19, 0.4634713, 27, 18.25, 0.4634713, 27.75, 15.25, 0.4634713, 36.5, 24, 0.4634713, 36.5, 15.25, 0.4634713, 28, 1.75, 0.4634713, 27, -2, 0.4634713, 27, 3, 0.4634713, 28, -2.75, 0.4634713, 27.75, -4.25, 0.4634713, 27.75, -4, 0.4634713, 36.5, 3, 0.4634713, 36.5, -19.25, 0.4634713, 27, -18, 0.4634713, 28, -24, 0.4634713, 36.5, -18, 0.4634713, 36.5) @@ -19,6 +22,97 @@ agent_radius = 1.0 [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6w4ab"] bg_color = Color(0, 0, 0, 1) +[sub_resource type="ShaderMaterial" id="ShaderMaterial_0rg8l"] +resource_local_to_scene = true +shader = ExtResource("7_maq6b") +shader_parameter/effect_amount = 0.0 + +[sub_resource type="Animation" id="Animation_5mwf5"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Greyscale/GreyscaleRect:material:shader_parameter/effect_amount") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("TimescaleNode:time_scale") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [1.0] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("ResultsScreen/PanelContainer:position") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(281, 21)] +} + +[sub_resource type="Animation" id="Animation_6w4ab"] +resource_name = "death" +length = 4.0 +step = 0.1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Greyscale/GreyscaleRect:material:shader_parameter/effect_amount") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 2), +"transitions": PackedFloat32Array(1.3195077, 1), +"update": 0, +"values": [0.0, 1.0] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("TimescaleNode:time_scale") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0, 2), +"transitions": PackedFloat32Array(0.35355353, 1), +"update": 0, +"values": [1.0, 0.1] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("ResultsScreen/PanelContainer:position") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(2, 2.1, 2.4, 2.5, 2.9, 3.5), +"transitions": PackedFloat32Array(1, 1, 1, 1, 0.61557204, 1), +"update": 0, +"values": [Vector2(281, 698), Vector2(281, 596.45), Vector2(281, 596.45), Vector2(281, 479), Vector2(281, 479), Vector2(281, 21)] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_n8wy4"] +_data = { +&"RESET": SubResource("Animation_5mwf5"), +&"death": SubResource("Animation_6w4ab") +} + [node name="BaseLevel" type="Node3D" unique_id=815380624] script = ExtResource("1_63c5o") @@ -63,6 +157,7 @@ autostart = true [node name="ResultsScreen" type="CanvasLayer" parent="." unique_id=1885670836] unique_name_in_owner = true +layer = 200 script = ExtResource("4_satuh") [node name="PanelContainer" type="PanelContainer" parent="ResultsScreen" unique_id=1295223482] @@ -74,7 +169,7 @@ anchor_bottom = 0.5 offset_left = -295.0 offset_top = -303.0 offset_right = 295.0 -offset_bottom = 303.0 +offset_bottom = 302.99854 grow_horizontal = 2 grow_vertical = 2 theme = ExtResource("5_46036") @@ -238,6 +333,26 @@ text = "Title Screen" custom_minimum_size = Vector2(0, 34.6) layout_mode = 2 +[node name="Greyscale" type="CanvasLayer" parent="." unique_id=206551409] +layer = 100 + +[node name="GreyscaleRect" type="ColorRect" parent="Greyscale" unique_id=742213362] +material = SubResource("ShaderMaterial_0rg8l") +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 + +[node name="DeathAnimation" type="AnimationPlayer" parent="." unique_id=81477302] +unique_name_in_owner = true +libraries/ = SubResource("AnimationLibrary_n8wy4") +script = ExtResource("9_n8wy4") + +[node name="TimescaleNode" type="Node" parent="." unique_id=1445092304] +script = ExtResource("10_dx6c5") + [connection signal="died" from="Player" to="." method="_on_player_died"] [connection signal="timeout" from="EnemySpawner/Timer" to="EnemySpawner" method="_on_timer_timeout"] [connection signal="pressed" from="ResultsScreen/PanelContainer/VBoxContainer/HBoxContainer/Restart" to="ResultsScreen" method="_on_restart_pressed"] diff --git a/levels/death_animation.gd b/levels/death_animation.gd new file mode 100644 index 0000000..ba0a2f7 --- /dev/null +++ b/levels/death_animation.gd @@ -0,0 +1,5 @@ +extends AnimationPlayer + +func _process(_delta: float) -> void: + # ensure animation speed is unscaled + speed_scale = 1. / Engine.time_scale diff --git a/levels/death_animation.gd.uid b/levels/death_animation.gd.uid new file mode 100644 index 0000000..f733141 --- /dev/null +++ b/levels/death_animation.gd.uid @@ -0,0 +1 @@ +uid://ck0331hehsf3n diff --git a/levels/greyscale.gdshader b/levels/greyscale.gdshader new file mode 100644 index 0000000..db49b9e --- /dev/null +++ b/levels/greyscale.gdshader @@ -0,0 +1,15 @@ +shader_type canvas_item; + +uniform float effect_amount: hint_range(0, 1) = 0.0; +uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest; + +void fragment() { + vec4 c = texture(screen_texture, SCREEN_UV); + float y = 0.2126 * c.r + 0.7152 * c.g + 0.0722 * c.b; + COLOR.rgb = mix(c.rgb, vec3(y), effect_amount); +} + +//void light() { +// // Called for every pixel for every light affecting the CanvasItem. +// // Uncomment to replace the default light processing function with this one. +//} diff --git a/levels/greyscale.gdshader.uid b/levels/greyscale.gdshader.uid new file mode 100644 index 0000000..8c2c2db --- /dev/null +++ b/levels/greyscale.gdshader.uid @@ -0,0 +1 @@ +uid://cgrk2eiljt4v1 diff --git a/levels/level.gd b/levels/level.gd index 18dd5af..68d59dd 100644 --- a/levels/level.gd +++ b/levels/level.gd @@ -22,9 +22,12 @@ static func is_active() -> bool: return false func _ready() -> void: + %ResultsScreen.hide() level = self func _on_player_died() -> void: active = false + %DeathAnimation.play(&"death") + %ResultsScreen.update_labels() %ResultsScreen.show() diff --git a/levels/results_screen.gd b/levels/results_screen.gd index 6980236..ef0d372 100644 --- a/levels/results_screen.gd +++ b/levels/results_screen.gd @@ -30,7 +30,7 @@ func _on_restart_pressed() -> void: get_tree().reload_current_scene() func _on_quit_pressed() -> void: - get_tree().quit() + get_tree().change_scene_to_file("res://ui/title_screen/title_screen.tscn") func _ready() -> void: SignalBus.building_destroyed.connect(func(_b, _s): buildings_destroyed_count += 1) diff --git a/levels/timescale_node.gd b/levels/timescale_node.gd new file mode 100644 index 0000000..70db73e --- /dev/null +++ b/levels/timescale_node.gd @@ -0,0 +1,8 @@ +extends Node + +@export var time_scale := 1.: + set(v): + Engine.time_scale = v + +func _ready() -> void: + time_scale = time_scale diff --git a/levels/timescale_node.gd.uid b/levels/timescale_node.gd.uid new file mode 100644 index 0000000..0381719 --- /dev/null +++ b/levels/timescale_node.gd.uid @@ -0,0 +1 @@ +uid://bm3t2dcw4e32i