diff --git a/Menu.gd b/Menu.gd index 59637d23..79c703dd 100644 --- a/Menu.gd +++ b/Menu.gd @@ -3,6 +3,5 @@ extends Node2D func _on_play_pressed(): get_tree().change_scene_to_file("res://prototypes/game-shadows-of-surveillance/levels/game-shadows-of-surveillance.tscn") - func _on_quit_pressed(): get_tree().quit() diff --git a/Restart.gd b/Restart.gd new file mode 100644 index 00000000..beada840 --- /dev/null +++ b/Restart.gd @@ -0,0 +1,8 @@ +extends Node2D + +func _on_quit_pressed(): + get_tree().quit() + +func _on_restart_pressed(): + get_tree().change_scene_to_file("res://prototypes/game-shadows-of-surveillance/levels/game-shadows-of-surveillance.tscn") + diff --git a/Restart.tscn b/Restart.tscn new file mode 100644 index 00000000..1069930e --- /dev/null +++ b/Restart.tscn @@ -0,0 +1,37 @@ +[gd_scene load_steps=4 format=3 uid="uid://c8uokctk4c37g"] + +[ext_resource type="Script" path="res://Restart.gd" id="1_b05ab"] +[ext_resource type="Texture2D" uid="uid://bauf77n1ppfno" path="res://background.png" id="2_yuasr"] + +[sub_resource type="SystemFont" id="SystemFont_vi34g"] + +[node name="MainMenu" type="Node2D"] +script = ExtResource("1_b05ab") + +[node name="Sprite2D" type="Sprite2D" parent="."] +position = Vector2(594, 325) +scale = Vector2(0.662946, 0.632139) +texture = ExtResource("2_yuasr") + +[node name="MarginContainer" type="MarginContainer" parent="."] +offset_left = 464.0 +offset_top = 210.0 +offset_right = 802.0 +offset_bottom = 455.0 + +[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"] +layout_mode = 2 +alignment = 1 + +[node name="Restart" type="Button" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +theme_override_fonts/font = SubResource("SystemFont_vi34g") +text = "Restart" + +[node name="Quit" type="Button" parent="MarginContainer/VBoxContainer"] +layout_mode = 2 +text = "Quit" + +[connection signal="pressed" from="MarginContainer/VBoxContainer/Restart" to="." method="_on_restart_pressed"] +[connection signal="pressed" from="MarginContainer/VBoxContainer/Restart" to="." method="_on_play_pressed"] +[connection signal="pressed" from="MarginContainer/VBoxContainer/Quit" to="." method="_on_quit_pressed"] diff --git a/prototypes/game-shadows-of-surveillance/characters/drone.tscn b/prototypes/game-shadows-of-surveillance/characters/drone.tscn index 2332b6a4..014d8b5e 100644 --- a/prototypes/game-shadows-of-surveillance/characters/drone.tscn +++ b/prototypes/game-shadows-of-surveillance/characters/drone.tscn @@ -11,7 +11,11 @@ [sub_resource type="CircleShape2D" id="CircleShape2D_kvhpb"] +<<<<<<< HEAD [sub_resource type="Image" id="Image_laljb"] +======= +[sub_resource type="Image" id="Image_e2286"] +>>>>>>> 0a1d7be (added respawn) data = { "data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 233, 233, 233, 23, 224, 224, 224, 198, 225, 225, 225, 199, 224, 224, 224, 24, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 233, 233, 233, 23, 224, 224, 224, 213, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 215, 224, 224, 224, 24, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 226, 226, 226, 103, 224, 224, 224, 255, 224, 224, 224, 212, 224, 224, 224, 209, 224, 224, 224, 255, 224, 224, 224, 107, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 226, 226, 226, 103, 232, 232, 232, 22, 230, 230, 230, 20, 224, 224, 224, 105, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 233, 233, 233, 23, 225, 225, 225, 109, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 107, 224, 224, 224, 24, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 233, 233, 233, 23, 224, 224, 224, 213, 224, 224, 224, 255, 225, 225, 225, 108, 255, 255, 255, 0, 225, 225, 225, 76, 224, 224, 224, 229, 224, 224, 224, 228, 224, 224, 224, 74, 255, 255, 255, 0, 224, 224, 224, 105, 224, 224, 224, 255, 225, 225, 225, 215, 224, 224, 224, 24, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 197, 224, 224, 224, 255, 224, 224, 224, 211, 231, 231, 231, 21, 255, 255, 255, 0, 224, 224, 224, 229, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 228, 255, 255, 255, 0, 230, 230, 230, 20, 224, 224, 224, 208, 224, 224, 224, 255, 224, 224, 224, 201, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 195, 224, 224, 224, 255, 225, 225, 225, 215, 224, 224, 224, 24, 255, 255, 255, 0, 224, 224, 224, 228, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 227, 255, 255, 255, 0, 233, 233, 233, 23, 224, 224, 224, 213, 224, 224, 224, 255, 224, 224, 224, 198, 255, 255, 255, 0, 255, 255, 255, 0, 231, 231, 231, 21, 224, 224, 224, 210, 224, 224, 224, 255, 224, 224, 224, 107, 255, 255, 255, 0, 224, 224, 224, 74, 224, 224, 224, 228, 224, 224, 224, 227, 224, 224, 224, 72, 255, 255, 255, 0, 226, 226, 226, 103, 224, 224, 224, 255, 224, 224, 224, 212, 232, 232, 232, 22, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 231, 231, 231, 21, 224, 224, 224, 105, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 226, 226, 226, 103, 232, 232, 232, 22, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 107, 224, 224, 224, 24, 232, 232, 232, 22, 225, 225, 225, 109, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 105, 224, 224, 224, 255, 225, 225, 225, 215, 224, 224, 224, 211, 224, 224, 224, 255, 225, 225, 225, 108, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 231, 231, 231, 21, 224, 224, 224, 210, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 212, 232, 232, 232, 22, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 231, 231, 231, 21, 224, 224, 224, 194, 224, 224, 224, 196, 232, 232, 232, 22, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0), "format": "RGBA8", @@ -21,7 +25,11 @@ data = { } [sub_resource type="ImageTexture" id="ImageTexture_1i6xe"] +<<<<<<< HEAD image = SubResource("Image_laljb") +======= +image = SubResource("Image_e2286") +>>>>>>> 0a1d7be (added respawn) [sub_resource type="GDScript" id="GDScript_6kxwn"] script/source = "@tool @@ -113,7 +121,11 @@ deferred = false enabled = true trigger = "" +<<<<<<< HEAD [sub_resource type="Image" id="Image_4gc6h"] +======= +[sub_resource type="Image" id="Image_6lp4v"] +>>>>>>> 0a1d7be (added respawn) data = { "data": PackedByteArray(255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 160, 230, 230, 230, 10, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 213, 225, 225, 225, 42, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 76, 224, 224, 224, 189, 224, 224, 224, 238, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 245, 224, 224, 224, 96, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 135, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 245, 226, 226, 226, 95, 255, 255, 255, 0, 255, 255, 255, 1, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 226, 226, 226, 77, 224, 224, 224, 255, 224, 224, 224, 253, 225, 225, 225, 117, 224, 224, 224, 32, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 255, 224, 224, 224, 212, 225, 225, 225, 42, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 129, 225, 225, 225, 68, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 189, 224, 224, 224, 255, 224, 224, 224, 113, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 159, 230, 230, 230, 10, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 73, 224, 224, 224, 255, 225, 225, 225, 183, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 242, 224, 224, 224, 255, 224, 224, 224, 24, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 25, 224, 224, 224, 255, 224, 224, 224, 237, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 243, 224, 224, 224, 254, 233, 233, 233, 23, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 229, 229, 229, 29, 224, 224, 224, 255, 224, 224, 224, 236, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 188, 224, 224, 224, 255, 225, 225, 225, 68, 255, 255, 255, 0, 255, 255, 255, 0, 230, 230, 230, 10, 224, 224, 224, 160, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 120, 224, 224, 224, 255, 224, 224, 224, 181, 255, 255, 255, 0, 255, 255, 255, 0, 227, 227, 227, 71, 225, 225, 225, 126, 255, 255, 255, 0, 255, 255, 255, 0, 226, 226, 226, 43, 224, 224, 224, 213, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 34, 225, 225, 225, 124, 224, 224, 224, 254, 224, 224, 224, 255, 226, 226, 226, 70, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 224, 224, 224, 96, 224, 224, 224, 245, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 225, 225, 225, 125, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 226, 226, 226, 95, 224, 224, 224, 245, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 237, 224, 224, 224, 185, 227, 227, 227, 71, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 225, 225, 225, 42, 224, 224, 224, 213, 224, 224, 224, 255, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 230, 230, 230, 10, 225, 225, 225, 159, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0, 255, 255, 255, 0), "format": "RGBA8", @@ -123,7 +135,11 @@ data = { } [sub_resource type="ImageTexture" id="ImageTexture_r1157"] +<<<<<<< HEAD image = SubResource("Image_4gc6h") +======= +image = SubResource("Image_6lp4v") +>>>>>>> 0a1d7be (added respawn) [node name="Enemy" type="CharacterBody2D" groups=["enemy"]] position = Vector2(870, 309) diff --git a/prototypes/game-shadows-of-surveillance/characters/droneBullet.gd b/prototypes/game-shadows-of-surveillance/characters/droneBullet.gd index 44e9431f..3b756c31 100644 --- a/prototypes/game-shadows-of-surveillance/characters/droneBullet.gd +++ b/prototypes/game-shadows-of-surveillance/characters/droneBullet.gd @@ -19,7 +19,12 @@ func _process(delta): func _on_body_entered(body): var playerHealth = get_parent().get_node("Player2").get_node("HealthBarBehavior") if body.is_in_group("player"): +<<<<<<< HEAD if playerHealth: playerHealth.damage(20) +======= + body.queue_free() + get_tree().change_scene_to_file("res://Restart.tscn") +>>>>>>> 0a1d7be (added respawn) if !body.is_in_group("enemy"): queue_free() diff --git a/prototypes/game-shadows-of-surveillance/levels/level.gd b/prototypes/game-shadows-of-surveillance/levels/level.gd new file mode 100644 index 00000000..cadd8a72 --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/levels/level.gd @@ -0,0 +1,16 @@ +extends Node2D + +var player +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + player = get_node("Player1") + if player: + if player.global_position.y > 1000: + player.queue_free() + get_tree().change_scene_to_file("res://Restart.tscn") + diff --git a/prototypes/game-shadows-of-surveillance/levels/level.tscn b/prototypes/game-shadows-of-surveillance/levels/level.tscn index 04937268..76d3d29a 100644 --- a/prototypes/game-shadows-of-surveillance/levels/level.tscn +++ b/prototypes/game-shadows-of-surveillance/levels/level.tscn @@ -1,6 +1,11 @@ +<<<<<<< HEAD [gd_scene load_steps=10 format=3 uid="uid://dyvtu758xr2so"] +======= +[gd_scene load_steps=9 format=3 uid="uid://dyvtu758xr2so"] +>>>>>>> 0a1d7be (added respawn) [ext_resource type="Texture2D" uid="uid://bhjxc5s34c3cu" path="res://prototypes/game-shadows-of-surveillance/assets/10.png" id="1_elldh"] +[ext_resource type="Script" path="res://prototypes/game-shadows-of-surveillance/levels/level.gd" id="1_urrte"] [ext_resource type="Script" path="res://prototypes/game-shadows-of-surveillance/scripts/LightSwitch.gd" id="2_4klox"] [ext_resource type="Script" path="res://addons/pronto/behaviors/PlaceholderBehavior.gd" id="3_euvp3"] [ext_resource type="TileSet" uid="uid://dp12gfueqor5q" path="res://tileset.tres" id="3_r5ys7"] @@ -13,12 +18,21 @@ size = Vector2(11, 29) [node name="Level" type="Node2D"] +script = ExtResource("1_urrte") [node name="Background" type="Sprite2D" parent="."] -position = Vector2(577, 323.5) +position = Vector2(577, 208.5) scale = Vector2(2.5, 2.51) texture = ExtResource("1_elldh") +[node name="Background2" type="Sprite2D" parent="Background"] +position = Vector2(2304, 2.08165e-12) +texture = ExtResource("1_elldh") + +[node name="Background3" type="Sprite2D" parent="Background/Background2"] +position = Vector2(2304, 2.08165e-12) +texture = ExtResource("1_elldh") + [node name="LightSwitch" type="Area2D" parent="." groups=["button"]] position = Vector2(466, 480) scale = Vector2(0.99, 0.99) @@ -50,7 +64,7 @@ script = ExtResource("6_i4obq") [node name="TileMap" type="TileMap" parent="."] tile_set = ExtResource("3_r5ys7") format = 2 -layer_0/tile_data = PackedInt32Array(2424834, 524288, 6, 2424835, 589824, 6, 2424836, 589824, 6, 2424837, 589824, 6, 2424838, 589824, 6, 2424839, 589824, 6, 2424840, 589824, 6, 2424841, 589824, 6, 2424842, 589824, 6, 2424843, 589824, 6, 2424844, 589824, 6, 2424845, 589824, 6, 2424846, 589824, 6, 2424847, 589824, 6, 2424848, 589824, 6, 2424849, 589824, 6, 2490370, 524288, 7, 2555906, 524288, 7, 2621442, 524288, 7, 2490371, 589824, 7, 2555907, 589824, 7, 2621443, 589824, 7, 2621444, 589824, 7, 2621445, 589824, 7, 2621446, 589824, 7, 2621447, 589824, 7, 2621448, 589824, 7, 2621449, 589824, 7, 2621450, 589824, 7, 2621451, 589824, 7, 2621452, 589824, 7, 2621453, 589824, 7, 2621454, 589824, 7, 2621455, 589824, 7, 2621456, 589824, 7, 2621457, 589824, 7, 2621458, 589824, 7, 2555922, 589824, 7, 2490386, 589824, 7, 2490385, 589824, 7, 2490384, 589824, 7, 2490383, 589824, 7, 2490382, 589824, 7, 2490381, 589824, 7, 2490380, 589824, 7, 2490379, 589824, 7, 2490378, 589824, 7, 2490377, 589824, 7, 2490376, 589824, 7, 2490375, 589824, 7, 2490374, 589824, 7, 2490373, 589824, 7, 2490372, 589824, 7, 2555908, 589824, 7, 2555909, 589824, 7, 2555910, 589824, 7, 2555911, 589824, 7, 2555912, 589824, 7, 2555913, 589824, 7, 2555914, 589824, 7, 2555915, 589824, 7, 2555916, 589824, 7, 2555917, 589824, 7, 2555918, 589824, 7, 2555919, 589824, 7, 2555920, 589824, 7, 2555921, 589824, 7, 2424850, 589824, 6, 2490387, 655360, 7, 2424851, 655360, 6, 2555923, 655360, 7, 2621459, 655360, 7, 2228250, 589824, 6, 2228251, 589824, 6, 2228252, 589824, 6, 2228253, 589824, 6, 2228254, 589824, 6, 2228255, 589824, 6, 2228256, 589824, 6, 2228257, 589824, 6, 2228258, 589824, 6, 2228259, 589824, 6, 2228260, 589824, 6, 2228261, 589824, 6, 2228262, 589824, 6, 2228263, 589824, 6, 2228264, 589824, 6, 2228249, 524288, 6, 2293785, 524288, 7, 2359321, 524288, 7, 2424857, 524288, 7, 2490393, 524288, 7, 2555929, 524288, 7, 2621465, 524288, 7, 2293786, 589824, 7, 2359322, 589824, 7, 2424858, 589824, 7, 2490394, 589824, 7, 2555930, 589824, 7, 2621466, 589824, 7, 2293787, 589824, 7, 2293788, 589824, 7, 2293789, 589824, 7, 2293790, 589824, 7, 2293791, 589824, 7, 2293792, 589824, 7, 2293793, 589824, 7, 2293794, 589824, 7, 2293795, 589824, 7, 2293796, 589824, 7, 2293797, 589824, 7, 2293798, 589824, 7, 2293799, 589824, 7, 2293800, 589824, 7, 2359336, 589824, 7, 2424872, 589824, 7, 2490408, 589824, 7, 2555944, 589824, 7, 2621480, 589824, 7, 2621479, 589824, 7, 2621478, 589824, 7, 2621477, 589824, 7, 2621476, 589824, 7, 2621475, 589824, 7, 2621474, 589824, 7, 2621473, 589824, 7, 2621472, 589824, 7, 2621471, 589824, 7, 2621470, 589824, 7, 2621469, 589824, 7, 2621468, 589824, 7, 2621467, 589824, 7, 2555931, 589824, 7, 2490396, 589824, 7, 2424859, 589824, 7, 2490395, 589824, 7, 2359323, 589824, 7, 2424860, 589824, 7, 2555933, 589824, 7, 2490397, 589824, 7, 2424861, 589824, 7, 2359325, 589824, 7, 2359324, 589824, 7, 2555932, 589824, 7, 2359327, 589824, 7, 2424863, 589824, 7, 2490399, 589824, 7, 2555935, 589824, 7, 2555934, 589824, 7, 2490398, 589824, 7, 2424862, 589824, 7, 2359326, 589824, 7, 2359328, 589824, 7, 2424864, 589824, 7, 2490400, 589824, 7, 2555936, 589824, 7, 2490401, 589824, 7, 2424865, 589824, 7, 2359329, 589824, 7, 2555937, 589824, 7, 2555938, 589824, 7, 2490402, 589824, 7, 2424866, 589824, 7, 2359330, 589824, 7, 2490403, 589824, 7, 2424867, 589824, 7, 2359331, 589824, 7, 2555939, 589824, 7, 2555940, 589824, 7, 2490404, 589824, 7, 2424868, 589824, 7, 2359332, 589824, 7, 2555941, 589824, 7, 2490405, 589824, 7, 2424869, 589824, 7, 2359333, 589824, 7, 2555942, 589824, 7, 2490406, 589824, 7, 2424870, 589824, 7, 2359334, 589824, 7, 2555943, 589824, 7, 2490407, 589824, 7, 2424871, 589824, 7, 2359335, 589824, 7, 2228265, 655360, 6, 2293801, 655360, 7, 2359337, 655360, 7, 2424873, 655360, 7, 2490409, 655360, 7, 2555945, 655360, 7, 2621481, 655360, 7, 2686978, 524288, 8, 2686995, 655360, 8, 2686979, 589824, 8, 2686980, 589824, 8, 2686981, 589824, 8, 2686982, 589824, 8, 2686983, 589824, 8, 2686984, 589824, 8, 2686985, 589824, 8, 2686986, 589824, 8, 2686987, 589824, 8, 2686988, 589824, 8, 2686989, 589824, 8, 2686990, 589824, 8, 2686991, 589824, 8, 2686992, 589824, 8, 2686993, 589824, 8, 2686994, 589824, 8, 2687001, 524288, 8, 2687002, 589824, 8, 2687003, 589824, 8, 2687004, 589824, 8, 2687005, 589824, 8, 2687006, 589824, 8, 2687007, 589824, 8, 2687008, 589824, 8, 2687009, 589824, 8, 2687010, 589824, 8, 2687011, 589824, 8, 2687012, 589824, 8, 2687013, 589824, 8, 2687014, 589824, 8, 2687015, 589824, 8, 2687016, 589824, 8, 2687017, 655360, 8) +layer_0/tile_data = PackedInt32Array(2424834, 524288, 6, 2424835, 589824, 6, 2424836, 589824, 6, 2424837, 589824, 6, 2424838, 589824, 6, 2424839, 589824, 6, 2424840, 589824, 6, 2424841, 589824, 6, 2424842, 589824, 6, 2424843, 589824, 6, 2424844, 589824, 6, 2424845, 589824, 6, 2424846, 589824, 6, 2424847, 589824, 6, 2424848, 589824, 6, 2424849, 589824, 6, 2490370, 524288, 7, 2555906, 524288, 7, 2621442, 524288, 7, 2490371, 589824, 7, 2555907, 589824, 7, 2621443, 589824, 7, 2621444, 589824, 7, 2621445, 589824, 7, 2621446, 589824, 7, 2621447, 589824, 7, 2621448, 589824, 7, 2621449, 589824, 7, 2621450, 589824, 7, 2621451, 589824, 7, 2621452, 589824, 7, 2621453, 589824, 7, 2621454, 589824, 7, 2621455, 589824, 7, 2621456, 589824, 7, 2621457, 589824, 7, 2621458, 589824, 7, 2555922, 589824, 7, 2490386, 589824, 7, 2490385, 589824, 7, 2490384, 589824, 7, 2490383, 589824, 7, 2490382, 589824, 7, 2490381, 589824, 7, 2490380, 589824, 7, 2490379, 589824, 7, 2490378, 589824, 7, 2490377, 589824, 7, 2490376, 589824, 7, 2490375, 589824, 7, 2490374, 589824, 7, 2490373, 589824, 7, 2490372, 589824, 7, 2555908, 589824, 7, 2555909, 589824, 7, 2555910, 589824, 7, 2555911, 589824, 7, 2555912, 589824, 7, 2555913, 589824, 7, 2555914, 589824, 7, 2555915, 589824, 7, 2555916, 589824, 7, 2555917, 589824, 7, 2555918, 589824, 7, 2555919, 589824, 7, 2555920, 589824, 7, 2555921, 589824, 7, 2424850, 589824, 6, 2490387, 655360, 7, 2424851, 655360, 6, 2555923, 655360, 7, 2621459, 655360, 7, 2228250, 589824, 6, 2228251, 589824, 6, 2228252, 589824, 6, 2228253, 589824, 6, 2228254, 589824, 6, 2228255, 589824, 6, 2228256, 589824, 6, 2228257, 589824, 6, 2228258, 589824, 6, 2228259, 589824, 6, 2228260, 589824, 6, 2228261, 589824, 6, 2228262, 589824, 6, 2228263, 589824, 6, 2228264, 589824, 6, 2228249, 524288, 6, 2293785, 524288, 7, 2359321, 524288, 7, 2424857, 524288, 7, 2490393, 524288, 7, 2555929, 524288, 7, 2621465, 524288, 7, 2293786, 589824, 7, 2359322, 589824, 7, 2424858, 589824, 7, 2490394, 589824, 7, 2555930, 589824, 7, 2621466, 589824, 7, 2293787, 589824, 7, 2293788, 589824, 7, 2293789, 589824, 7, 2293790, 589824, 7, 2293791, 589824, 7, 2293792, 589824, 7, 2293793, 589824, 7, 2293794, 589824, 7, 2293795, 589824, 7, 2293796, 589824, 7, 2293797, 589824, 7, 2293798, 589824, 7, 2293799, 589824, 7, 2293800, 589824, 7, 2359336, 589824, 7, 2424872, 589824, 7, 2490408, 589824, 7, 2555944, 589824, 7, 2621480, 589824, 7, 2621479, 589824, 7, 2621478, 589824, 7, 2621477, 589824, 7, 2621476, 589824, 7, 2621475, 589824, 7, 2621474, 589824, 7, 2621473, 589824, 7, 2621472, 589824, 7, 2621471, 589824, 7, 2621470, 589824, 7, 2621469, 589824, 7, 2621468, 589824, 7, 2621467, 589824, 7, 2555931, 589824, 7, 2490396, 589824, 7, 2424859, 589824, 7, 2490395, 589824, 7, 2359323, 589824, 7, 2424860, 589824, 7, 2555933, 589824, 7, 2490397, 589824, 7, 2424861, 589824, 7, 2359325, 589824, 7, 2359324, 589824, 7, 2555932, 589824, 7, 2359327, 589824, 7, 2424863, 589824, 7, 2490399, 589824, 7, 2555935, 589824, 7, 2555934, 589824, 7, 2490398, 589824, 7, 2424862, 589824, 7, 2359326, 589824, 7, 2359328, 589824, 7, 2424864, 589824, 7, 2490400, 589824, 7, 2555936, 589824, 7, 2490401, 589824, 7, 2424865, 589824, 7, 2359329, 589824, 7, 2555937, 589824, 7, 2555938, 589824, 7, 2490402, 589824, 7, 2424866, 589824, 7, 2359330, 589824, 7, 2490403, 589824, 7, 2424867, 589824, 7, 2359331, 589824, 7, 2555939, 589824, 7, 2555940, 589824, 7, 2490404, 589824, 7, 2424868, 589824, 7, 2359332, 589824, 7, 2555941, 589824, 7, 2490405, 589824, 7, 2424869, 589824, 7, 2359333, 589824, 7, 2555942, 589824, 7, 2490406, 589824, 7, 2424870, 589824, 7, 2359334, 589824, 7, 2555943, 589824, 7, 2490407, 589824, 7, 2424871, 589824, 7, 2359335, 589824, 7, 2228265, 655360, 6, 2293801, 655360, 7, 2359337, 655360, 7, 2424873, 655360, 7, 2490409, 655360, 7, 2555945, 655360, 7, 2621481, 655360, 7, 2686978, 524288, 8, 2686995, 655360, 8, 2686979, 589824, 8, 2686980, 589824, 8, 2686981, 589824, 8, 2686982, 589824, 8, 2686983, 589824, 8, 2686984, 589824, 8, 2686985, 589824, 8, 2686986, 589824, 8, 2686987, 589824, 8, 2686988, 589824, 8, 2686989, 589824, 8, 2686990, 589824, 8, 2686991, 589824, 8, 2686992, 589824, 8, 2686993, 589824, 8, 2686994, 589824, 8, 2687001, 524288, 8, 2687002, 589824, 8, 2687003, 589824, 8, 2687004, 589824, 8, 2687005, 589824, 8, 2687006, 589824, 8, 2687007, 589824, 8, 2687008, 589824, 8, 2687009, 589824, 8, 2687010, 589824, 8, 2687011, 589824, 8, 2687012, 589824, 8, 2687013, 589824, 8, 2687014, 589824, 8, 2687015, 589824, 8, 2687016, 589824, 8, 2687017, 655360, 8, 2162735, 524288, 6, 2228271, 524288, 7, 2293807, 524288, 8, 2162736, 589824, 6, 2228272, 589824, 7, 2293808, 589824, 8, 2162737, 589824, 6, 2228273, 589824, 7, 2293809, 589824, 8, 2162738, 589824, 6, 2228274, 589824, 7, 2293810, 589824, 8, 2162739, 589824, 6, 2228275, 589824, 7, 2293811, 589824, 8, 2162740, 589824, 6, 2228276, 589824, 7, 2293812, 589824, 8, 2162741, 589824, 6, 2228277, 589824, 7, 2293813, 589824, 8, 2162742, 589824, 6, 2228278, 589824, 7, 2293814, 589824, 8, 2162743, 589824, 6, 2228279, 589824, 7, 2293815, 589824, 8, 2162744, 589824, 6, 2228280, 589824, 7, 2293816, 589824, 8, 2162745, 589824, 6, 2228281, 589824, 7, 2293817, 589824, 8, 2162746, 589824, 6, 2228282, 589824, 7, 2293818, 589824, 8, 2162747, 655360, 6, 2228283, 655360, 7, 2293819, 655360, 8, 2359358, 720896, 6, 2424894, 720896, 7, 2359359, 786432, 6, 2424895, 786432, 7, 2359362, 720896, 6, 2424898, 720896, 7, 2359363, 786432, 6, 2424899, 786432, 7, 2359366, 720896, 6, 2424902, 720896, 7, 2359367, 786432, 6, 2424903, 786432, 7, 2293833, 720896, 6, 2359369, 720896, 7, 2293834, 786432, 6, 2359370, 786432, 7, 2883660, 720896, 6, 2949196, 720896, 7, 2883661, 786432, 6, 2949197, 786432, 7, 2883663, 720896, 6, 2949199, 720896, 7, 2883664, 786432, 6, 2949200, 786432, 7, 2162762, 458752, 6, 2228298, 458752, 7) [node name="Rifle" type="Area2D" parent="." groups=["rifle"]] position = Vector2(614, 525) diff --git a/prototypes/game-shadows-of-surveillance/levels/level2.gd b/prototypes/game-shadows-of-surveillance/levels/level2.gd new file mode 100644 index 00000000..0360ea47 --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/levels/level2.gd @@ -0,0 +1,16 @@ +extends Node2D + +var player +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + player = get_node("Player2") + if player: + if player.global_position.y > 1000: + player.queue_free() + get_tree().change_scene_to_file("res://Restart.tscn") + diff --git a/prototypes/game-shadows-of-surveillance/levels/level2.tscn b/prototypes/game-shadows-of-surveillance/levels/level2.tscn index 5795aabe..17a92c73 100644 --- a/prototypes/game-shadows-of-surveillance/levels/level2.tscn +++ b/prototypes/game-shadows-of-surveillance/levels/level2.tscn @@ -1,5 +1,6 @@ -[gd_scene load_steps=6 format=3 uid="uid://nrfvxvrpbboq"] +[gd_scene load_steps=7 format=3 uid="uid://nrfvxvrpbboq"] +[ext_resource type="Script" path="res://prototypes/game-shadows-of-surveillance/levels/level2.gd" id="1_eq0v8"] [ext_resource type="Texture2D" uid="uid://ej3g6agmjf0x" path="res://prototypes/game-shadows-of-surveillance/assets/6.png" id="1_j6sv0"] [ext_resource type="PackedScene" uid="uid://4j52c4ucysq5" path="res://Tilemap.tscn" id="2_llo4g"] [ext_resource type="TileSet" uid="uid://dp12gfueqor5q" path="res://tileset.tres" id="3_ko4tt"] @@ -7,6 +8,7 @@ [ext_resource type="PackedScene" uid="uid://dxp4mlvvs0g2" path="res://prototypes/game-shadows-of-surveillance/characters/player2.tscn" id="5_a7n2h"] [node name="Level2" type="Node2D"] +script = ExtResource("1_eq0v8") [node name="Background" type="Sprite2D" parent="."] position = Vector2(578, 319) @@ -38,10 +40,10 @@ color = Color(0.141176, 0.588235, 0.862745, 1) [node name="Floor" type="ColorRect" parent="Background"] offset_left = -288.0 -offset_top = 159.0 +offset_top = 162.0 offset_right = 2016.0 -offset_bottom = 314.0 -color = Color(0.14902, 0.109804, 0.215686, 1) +offset_bottom = 317.0 +color = Color(0.137255, 0.105882, 0.203922, 1) [node name="TileMap" parent="." instance=ExtResource("2_llo4g")] tile_set = ExtResource("3_ko4tt") diff --git a/prototypes/game-shadows-of-surveillance/scripts/drone.gd b/prototypes/game-shadows-of-surveillance/scripts/drone.gd index 403bb09b..69afac06 100644 --- a/prototypes/game-shadows-of-surveillance/scripts/drone.gd +++ b/prototypes/game-shadows-of-surveillance/scripts/drone.gd @@ -29,7 +29,10 @@ func _physics_process(delta): if player: var heightDifference = player.position.y - position.y +<<<<<<< HEAD #print(heightDifference) +======= +>>>>>>> 0a1d7be (added respawn) if heightDifference < minimalHeightDiff: velocity.y = -130 minimalHeightDiff = 200