diff --git a/addons/pronto/behaviors/CollisionBehavior.gd b/addons/pronto/behaviors/CollisionBehavior.gd index 7b4ae273..ecb40320 100644 --- a/addons/pronto/behaviors/CollisionBehavior.gd +++ b/addons/pronto/behaviors/CollisionBehavior.gd @@ -92,7 +92,6 @@ func toggleVisibility(node): func _on_area_2d_body_entered(body): var dark = get_tree().get_nodes_in_group("dark") - print("dark:", dark) if dark: toggleVisibility(dark[0]) @@ -117,9 +116,9 @@ func _on_rifle_body_entered(body): player2.timeCapsule = true get_tree().get_nodes_in_group("rifle")[0].queue_free() - #var labels = get_tree().get_nodes_in_group("label") - #for label in labels: - #label.show() - #await get_tree().create_timer(3).timeout - #for label in labels: - #label.hide() + var labels = get_tree().get_nodes_in_group("label") + for label in labels: + label.show() + await get_tree().create_timer(3).timeout + for label in labels: + label.hide() diff --git a/project.godot b/project.godot index 60a4c8a1..05d631d7 100644 --- a/project.godot +++ b/project.godot @@ -131,9 +131,14 @@ input_left_mouse={ shoot={ "deadzone": 0.5, "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":76,"key_label":0,"unicode":108,"echo":false,"script":null) +, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null) ] } +[physics] + +2d/default_gravity=750.0 + [rendering] textures/canvas_textures/default_texture_filter=0 diff --git a/prototypes/game-shadows-of-surveillance/characters/PlatformerControllerPlayer2.gd b/prototypes/game-shadows-of-surveillance/characters/PlatformerControllerPlayer2.gd index 1983993a..0e9ef4c7 100644 --- a/prototypes/game-shadows-of-surveillance/characters/PlatformerControllerPlayer2.gd +++ b/prototypes/game-shadows-of-surveillance/characters/PlatformerControllerPlayer2.gd @@ -1,4 +1,3 @@ -@tool #thumb("JoyButton") extends Behavior class_name PlatformerControllerPlayer2 diff --git a/prototypes/game-shadows-of-surveillance/characters/drone.tscn b/prototypes/game-shadows-of-surveillance/characters/drone.tscn index 1dd10476..052340ee 100644 --- a/prototypes/game-shadows-of-surveillance/characters/drone.tscn +++ b/prototypes/game-shadows-of-surveillance/characters/drone.tscn @@ -11,7 +11,7 @@ [sub_resource type="CircleShape2D" id="CircleShape2D_kvhpb"] -[sub_resource type="Image" id="Image_ri0ew"] +[sub_resource type="Image" id="Image_28t78"] 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 +21,7 @@ data = { } [sub_resource type="ImageTexture" id="ImageTexture_1i6xe"] -image = SubResource("Image_ri0ew") +image = SubResource("Image_28t78") [sub_resource type="GDScript" id="GDScript_6kxwn"] script/source = "@tool @@ -72,7 +72,7 @@ trigger = "" script/source = "@tool extends U @warning_ignore(\"unused_parameter\") -func run(delta, from: Node2D, to: Node2D): +func run(delta, from, to): var player = get_parent().get_parent().get_parent().get_node(\"Player2\") var random_x = randf_range(-50, 50) var random_y = randf_range(-50, 50) @@ -113,7 +113,7 @@ deferred = false enabled = true trigger = "" -[sub_resource type="Image" id="Image_r6qqn"] +[sub_resource type="Image" id="Image_l4lx3"] 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 +123,7 @@ data = { } [sub_resource type="ImageTexture" id="ImageTexture_r1157"] -image = SubResource("Image_r6qqn") +image = SubResource("Image_l4lx3") [node name="Enemy" type="CharacterBody2D" groups=["enemy"]] position = Vector2(870, 309) diff --git a/prototypes/game-shadows-of-surveillance/characters/player1.gd b/prototypes/game-shadows-of-surveillance/characters/player1.gd new file mode 100644 index 00000000..f7fbc546 --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/player1.gd @@ -0,0 +1,23 @@ +extends CharacterBody2D + + +const SPEED = 150.0 +const JUMP_VELOCITY = -300.0 + +# Get the gravity from the project settings to be synced with RigidBody nodes. +var gravity = ProjectSettings.get_setting("physics/2d/default_gravity") + + +func _physics_process(delta): + # Add the gravity. + if not is_on_floor(): + velocity.y += gravity * delta + + # Handle jump. + if Input.is_action_just_pressed("ui_accept") and is_on_floor(): + velocity.y = JUMP_VELOCITY + + # Get the input direction and handle the movement/deceleration. + # As good practice, you should replace UI actions with custom gameplay actions. + + move_and_slide() diff --git a/prototypes/game-shadows-of-surveillance/characters/player1.tscn b/prototypes/game-shadows-of-surveillance/characters/player1.tscn index 835d9b09..b5095a69 100644 --- a/prototypes/game-shadows-of-surveillance/characters/player1.tscn +++ b/prototypes/game-shadows-of-surveillance/characters/player1.tscn @@ -1,12 +1,14 @@ -[gd_scene load_steps=4 format=3 uid="uid://c5c24526dtufn"] +[gd_scene load_steps=5 format=3 uid="uid://c5c24526dtufn"] [ext_resource type="Texture2D" uid="uid://cfemjjj52u7tw" path="res://prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Idle (32x32).png" id="1_am0mg"] +[ext_resource type="Script" path="res://prototypes/game-shadows-of-surveillance/characters/player1.gd" id="1_y1ib3"] [ext_resource type="Script" path="res://prototypes/game-shadows-of-surveillance/characters/PlatfomerControllerPlayer1.gd" id="2_opehh"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_7aa12"] size = Vector2(17.84, 19.8482) [node name="Player1" type="CharacterBody2D" groups=["player"]] +script = ExtResource("1_y1ib3") [node name="DavidPlayer1" type="Sprite2D" parent="."] position = Vector2(0, 4.76837e-07) @@ -22,3 +24,5 @@ shape = SubResource("RectangleShape2D_7aa12") [node name="PlatformerControllerPlayer1" type="Node2D" parent="."] position = Vector2(576, 324) script = ExtResource("2_opehh") +jump_velocity = 350.0 +horizontal_velocity = 300.0 diff --git a/prototypes/game-shadows-of-surveillance/characters/player2.tscn b/prototypes/game-shadows-of-surveillance/characters/player2.tscn index 5b52d09f..f067a411 100644 --- a/prototypes/game-shadows-of-surveillance/characters/player2.tscn +++ b/prototypes/game-shadows-of-surveillance/characters/player2.tscn @@ -3,7 +3,7 @@ [ext_resource type="Script" path="res://prototypes/game-shadows-of-surveillance/scripts/player2.gd" id="1_dxuki"] [ext_resource type="Texture2D" uid="uid://dx884i5e2o8ql" path="res://prototypes/game-shadows-of-surveillance/characters/Pink Man/Idle (32x32).png" id="2_3wlyp"] [ext_resource type="Script" path="res://prototypes/game-shadows-of-surveillance/characters/PlatformerControllerPlayer2.gd" id="3_kwpqc"] -[ext_resource type="Texture2D" uid="uid://ca3jyudumrgbl" path="res://LightSprite.png" id="4_u5jrv"] +[ext_resource type="Texture2D" uid="uid://ch6w3mr4w7ueu" path="res://LightSprite.png" id="4_u5jrv"] [ext_resource type="Script" path="res://addons/pronto/behaviors/HealthBarBehavior.gd" id="5_oymb4"] [ext_resource type="Script" path="res://addons/pronto/helpers/ConnectionScript.gd" id="6_82em1"] [ext_resource type="Script" path="res://addons/pronto/helpers/Connection.gd" id="7_dkbr3"] @@ -65,11 +65,13 @@ texture = ExtResource("4_u5jrv") [node name="PlatformerControllerBehavior2" type="Node2D" parent="."] position = Vector2(576, 324) script = ExtResource("3_kwpqc") +jump_velocity = 350.0 +horizontal_velocity = 300.0 [node name="HealthBarBehavior" type="Node2D" parent="."] position = Vector2(0, -11.6279) script = ExtResource("5_oymb4") -max = 10000 -current = 10000 +max = 200 +current = 200 progress_gradient = SubResource("Gradient_53jmr") metadata/pronto_connections = [SubResource("Resource_xvx8k")] diff --git a/prototypes/game-shadows-of-surveillance/characters/spawnerDrone.tscn b/prototypes/game-shadows-of-surveillance/characters/spawnerDrone.tscn new file mode 100644 index 00000000..4c7cfd3d --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/spawnerDrone.tscn @@ -0,0 +1,178 @@ +[gd_scene load_steps=24 format=3 uid="uid://bgp6gb2h3myof"] + +[ext_resource type="Script" path="res://prototypes/game-shadows-of-surveillance/scripts/drone.gd" id="1_fox4f"] +[ext_resource type="Script" path="res://addons/pronto/helpers/Behavior.gd" id="2_1kpyf"] +[ext_resource type="Texture2D" uid="uid://dn1e3hoeursu" path="res://prototypes/game-shadows-of-surveillance/assets/drone.png" id="3_om10t"] +[ext_resource type="Script" path="res://addons/pronto/behaviors/MoveBehavior.gd" id="4_oguuv"] +[ext_resource type="Material" uid="uid://b5akcj0c3kh4w" path="res://addons/pronto/icons/icon_outline_material.tres" id="5_yx7ll"] +[ext_resource type="Script" path="res://addons/pronto/behaviors/AlwaysBehavior.gd" id="6_3hwvo"] +[ext_resource type="Script" path="res://addons/pronto/helpers/ConnectionScript.gd" id="7_d0ojv"] +[ext_resource type="Script" path="res://addons/pronto/helpers/Connection.gd" id="8_8n4uw"] + +[sub_resource type="CircleShape2D" id="CircleShape2D_kvhpb"] + +[sub_resource type="Image" id="Image_28t78"] +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", +"height": 16, +"mipmaps": false, +"width": 16 +} + +[sub_resource type="ImageTexture" id="ImageTexture_1i6xe"] +image = SubResource("Image_28t78") + +[sub_resource type="GDScript" id="GDScript_6kxwn"] +script/source = "@tool +extends U +@warning_ignore(\"unused_parameter\") +func run(delta, from, to): + var player = get_parent().get_parent().get_parent().get_parent().get_node(\"Player2\") + var random_x = randf_range(-50, 50) + var random_y = randf_range(-50, 50) + return (player.position - to.get_parent().position + Vector2(random_x, random_y)).normalized() +" + +[sub_resource type="Resource" id="Resource_htvxy"] +script = ExtResource("7_d0ojv") +nested_script = SubResource("GDScript_6kxwn") +argument_names = ["delta", "from", "to"] +return_value = true + +[sub_resource type="GDScript" id="GDScript_jvn02"] +script/source = "@tool +extends U +@warning_ignore(\"unused_parameter\") +func run(delta, from: Node2D, to: Node2D): + var player = get_parent().get_parent().get_parent().get_parent().get_node(\"Player2\") + if player: + return (player.position - to.get_parent().position).length() > 150 +" + +[sub_resource type="Resource" id="Resource_lsqwp"] +script = ExtResource("7_d0ojv") +nested_script = SubResource("GDScript_jvn02") +argument_names = ["delta", "from", "to"] +return_value = true + +[sub_resource type="Resource" id="Resource_81ot0"] +script = ExtResource("8_8n4uw") +signal_name = "always" +to = NodePath("..") +more_references = [] +invoke = "move_direction" +arguments = [SubResource("Resource_htvxy")] +only_if = SubResource("Resource_lsqwp") +deferred = false +enabled = true +trigger = "" + +[sub_resource type="GDScript" id="GDScript_gg4eo"] +script/source = "@tool +extends U +@warning_ignore(\"unused_parameter\") +func run(delta, from, to): + var player = get_parent().get_parent().get_parent().get_parent().get_node(\"Player2\") + var random_x = randf_range(-50, 50) + var random_y = randf_range(-50, 50) + return (player.position - to.get_parent().position + Vector2(random_x, random_y)).normalized() * Vector2(-1, -1) +" + +[sub_resource type="Resource" id="Resource_ln8xh"] +script = ExtResource("7_d0ojv") +nested_script = SubResource("GDScript_gg4eo") +argument_names = ["delta", "from", "to"] +return_value = true + +[sub_resource type="GDScript" id="GDScript_nxs8t"] +script/source = "@tool +extends U +@warning_ignore(\"unused_parameter\") +func run(delta, from: Node2D, to: Node2D): + var player = get_parent().get_parent().get_parent().get_parent().get_node(\"Player2\") + if player: + return (player.position - to.get_parent().position).length() < 150 +" + +[sub_resource type="Resource" id="Resource_yqroi"] +script = ExtResource("7_d0ojv") +nested_script = SubResource("GDScript_nxs8t") +argument_names = ["delta", "from", "to"] +return_value = true + +[sub_resource type="Resource" id="Resource_51sef"] +script = ExtResource("8_8n4uw") +signal_name = "always" +to = NodePath("..") +more_references = [] +invoke = "move_direction" +arguments = [SubResource("Resource_ln8xh")] +only_if = SubResource("Resource_yqroi") +deferred = false +enabled = true +trigger = "" + +[sub_resource type="Image" id="Image_l4lx3"] +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", +"height": 16, +"mipmaps": false, +"width": 16 +} + +[sub_resource type="ImageTexture" id="ImageTexture_r1157"] +image = SubResource("Image_l4lx3") + +[node name="Enemy" type="CharacterBody2D" groups=["enemy"]] +position = Vector2(870, 309) +scale = Vector2(0.274855, 0.274855) +script = ExtResource("1_fox4f") + +[node name="_Node2D_19803" type="Node2D" parent="."] +script = ExtResource("2_1kpyf") + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2(7.27649, -10.9149) +scale = Vector2(8.32211, 8.32211) +shape = SubResource("CircleShape2D_kvhpb") + +[node name="_Node2D_19804" type="Node2D" parent="CollisionShape2D"] +script = ExtResource("2_1kpyf") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("3_om10t") + +[node name="_Node2D_19805" type="Node2D" parent="Sprite2D"] +script = ExtResource("2_1kpyf") + +[node name="MoveBehavior" type="Node2D" parent="."] +position = Vector2(4.34964e-06, -49.7541) +script = ExtResource("4_oguuv") +max_velocity = 100.0 +acceleration = 20.0 + +[node name="_TextureRect_19799" type="TextureRect" parent="MoveBehavior"] +material = ExtResource("5_yx7ll") +offset_left = -8.0 +offset_top = -8.0 +offset_right = -8.0 +offset_bottom = -8.0 +texture = SubResource("ImageTexture_1i6xe") + +[node name="AlwaysBehavior" type="Node2D" parent="MoveBehavior"] +position = Vector2(-35.1815, 14.5728) +script = ExtResource("6_3hwvo") +metadata/pronto_connections = [SubResource("Resource_81ot0"), SubResource("Resource_51sef")] + +[node name="_TextureRect_19798" type="TextureRect" parent="MoveBehavior/AlwaysBehavior"] +material = ExtResource("5_yx7ll") +offset_left = -8.0 +offset_top = -8.0 +offset_right = -8.0 +offset_bottom = -8.0 +texture = SubResource("ImageTexture_r1157") + +[node name="Marker2D" type="Marker2D" parent="."] +position = Vector2(7.27661, -18.1914) diff --git a/prototypes/game-shadows-of-surveillance/levels/game-shadows-of-surveillance.tscn b/prototypes/game-shadows-of-surveillance/levels/game-shadows-of-surveillance.tscn index f395d1f6..f99e165b 100644 --- a/prototypes/game-shadows-of-surveillance/levels/game-shadows-of-surveillance.tscn +++ b/prototypes/game-shadows-of-surveillance/levels/game-shadows-of-surveillance.tscn @@ -1,10 +1,20 @@ -[gd_scene load_steps=5 format=3 uid="uid://c83unhh8aqtco"] +[gd_scene load_steps=7 format=3 uid="uid://c83unhh8aqtco"] [ext_resource type="Script" path="res://addons/pronto/behaviors/ExportBehavior.gd" id="1"] [ext_resource type="Script" path="res://prototypes/game-shadows-of-surveillance/scripts/game-shadows-of-surveillance.gd" id="1_odj0a"] [ext_resource type="PackedScene" uid="uid://dyvtu758xr2so" path="res://prototypes/game-shadows-of-surveillance/levels/level.tscn" id="3_3xcs3"] [ext_resource type="PackedScene" uid="uid://nrfvxvrpbboq" path="res://prototypes/game-shadows-of-surveillance/levels/level2.tscn" id="4_bj0tv"] +[sub_resource type="LabelSettings" id="LabelSettings_gbxak"] +font_size = 25 +outline_size = 2 +outline_color = Color(0, 0, 0, 1) + +[sub_resource type="LabelSettings" id="LabelSettings_5losd"] +font_size = 25 +outline_size = 2 +outline_color = Color(0, 0, 0, 1) + [node name="Game" type="Node2D"] script = ExtResource("1_odj0a") @@ -30,6 +40,13 @@ render_target_update_mode = 4 [node name="Level" parent="LeftSubViewportContainer/SubViewport" instance=ExtResource("3_3xcs3")] +[node name="LeftLabel" type="Label" parent="LeftSubViewportContainer" groups=["label"]] +visible = false +layout_mode = 2 +text = "You just put the Rifle into a time capsule!" +label_settings = SubResource("LabelSettings_gbxak") +horizontal_alignment = 1 + [node name="RightSubViewportContainer" type="SubViewportContainer" parent="."] offset_left = 576.0 offset_right = 1153.0 @@ -45,6 +62,13 @@ render_target_update_mode = 4 [node name="Level2" parent="RightSubViewportContainer/SubViewport" instance=ExtResource("4_bj0tv")] +[node name="RightLabel" type="Label" parent="RightSubViewportContainer" groups=["label"]] +visible = false +layout_mode = 2 +text = "You just found the Rifle in a time capsule!" +label_settings = SubResource("LabelSettings_5losd") +horizontal_alignment = 1 + [node name="ColorRect" type="ColorRect" parent="."] offset_left = 566.0 offset_top = -4.0 diff --git a/prototypes/game-shadows-of-surveillance/levels/level2.tscn b/prototypes/game-shadows-of-surveillance/levels/level2.tscn index 9edca0d6..f99e12aa 100644 --- a/prototypes/game-shadows-of-surveillance/levels/level2.tscn +++ b/prototypes/game-shadows-of-surveillance/levels/level2.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=45 format=3 uid="uid://nrfvxvrpbboq"] +[gd_scene load_steps=46 format=3 uid="uid://nrfvxvrpbboq"] [ext_resource type="Script" path="res://prototypes/game-shadows-of-surveillance/levels/level2.gd" id="1_33jqr"] [ext_resource type="Texture2D" uid="uid://ej3g6agmjf0x" path="res://prototypes/game-shadows-of-surveillance/assets/6.png" id="1_j6sv0"] @@ -7,6 +7,7 @@ [ext_resource type="PackedScene" uid="uid://ds24wbrnr7tta" path="res://prototypes/game-shadows-of-surveillance/characters/drone.tscn" id="4_m1bym"] [ext_resource type="PackedScene" uid="uid://dxp4mlvvs0g2" path="res://prototypes/game-shadows-of-surveillance/characters/player2.tscn" id="5_a7n2h"] [ext_resource type="Script" path="res://addons/pronto/behaviors/SpawnerBehavior.gd" id="7_ke1up"] +[ext_resource type="PackedScene" uid="uid://bgp6gb2h3myof" path="res://prototypes/game-shadows-of-surveillance/characters/spawnerDrone.tscn" id="8_aslly"] [ext_resource type="Script" path="res://addons/pronto/behaviors/ClockBehavior.gd" id="8_fh3bx"] [ext_resource type="Script" path="res://addons/pronto/helpers/ConnectionScript.gd" id="9_wm1v4"] [ext_resource type="Script" path="res://addons/pronto/helpers/Connection.gd" id="10_j1m30"] @@ -281,7 +282,6 @@ position = Vector2(575.714, 2.27374e-12) texture = ExtResource("1_j6sv0") [node name="CanvasModulate" type="CanvasModulate" parent="Background" groups=["dark"]] -visible = false color = Color(0, 0, 0, 1) [node name="Sky" type="ColorRect" parent="Background"] @@ -325,27 +325,24 @@ position = Vector2(688, 56) script = ExtResource("7_ke1up") metadata/pronto_connections = [] -[node name="drone3" parent="Spawner1" instance=ExtResource("4_m1bym")] -position = Vector2(519, 327) +[node name="Enemy" parent="Spawner1" instance=ExtResource("8_aslly")] [node name="Spawner2" type="Node2D" parent="."] position = Vector2(1277, -87) script = ExtResource("7_ke1up") -[node name="drone4" parent="Spawner2" instance=ExtResource("4_m1bym")] -position = Vector2(719, 327) +[node name="Enemy" parent="Spawner2" instance=ExtResource("8_aslly")] [node name="Spawner3" type="Node2D" parent="."] position = Vector2(2644, 228) script = ExtResource("7_ke1up") -[node name="drone5" parent="Spawner3" instance=ExtResource("4_m1bym")] -position = Vector2(2017, -117) +[node name="Enemy" parent="Spawner3" instance=ExtResource("8_aslly")] [node name="SpawnTimer" type="Node2D" parent="."] position = Vector2(1084, -56) script = ExtResource("8_fh3bx") -duration_seconds = 20.0 +duration_seconds = 5.0 trigger_interval_in_seconds = 1.0 metadata/pronto_connections = [SubResource("Resource_ygmac"), SubResource("Resource_fqdnk"), SubResource("Resource_7nopu")] diff --git a/prototypes/game-shadows-of-surveillance/levels/thumbnail.png b/prototypes/game-shadows-of-surveillance/levels/thumbnail.png index 5fa407c7..52cbb392 100644 Binary files a/prototypes/game-shadows-of-surveillance/levels/thumbnail.png and b/prototypes/game-shadows-of-surveillance/levels/thumbnail.png differ diff --git a/prototypes/game-shadows-of-surveillance/scripts/drone.gd b/prototypes/game-shadows-of-surveillance/scripts/drone.gd index 863f2d51..73dae585 100644 --- a/prototypes/game-shadows-of-surveillance/scripts/drone.gd +++ b/prototypes/game-shadows-of-surveillance/scripts/drone.gd @@ -28,7 +28,7 @@ func _physics_process(delta): # As good practice, you should replace UI actions with custom gameplay actions. if player: - var heightDifference = player.position.y - position.y + var heightDifference = player.global_position.y - global_position.y #print(heightDifference) if heightDifference < minimalHeightDiff: velocity.y = -130 diff --git a/prototypes/game-shadows-of-surveillance/scripts/player2.gd b/prototypes/game-shadows-of-surveillance/scripts/player2.gd index 67c953f6..820679c4 100644 --- a/prototypes/game-shadows-of-surveillance/scripts/player2.gd +++ b/prototypes/game-shadows-of-surveillance/scripts/player2.gd @@ -1,6 +1,6 @@ extends CharacterBody2D -const SPEED = 200.0 +const SPEED = 150.0 const JUMP_VELOCITY = -400.0 var timeCapsule = false const bullet_scene = preload("res://prototypes/game-shadows-of-surveillance/characters/bullet.tscn") @@ -19,12 +19,7 @@ func _physics_process(delta): # Get tehe input direction and handle the movement/deceleration. # As good practice, you should replace UI actions with custom gameplay actions. - var direction = Input.get_axis("ui_left", "ui_right") - if direction: - velocity.x = direction * SPEED - else: - velocity.x = move_toward(velocity.x, 0, SPEED) - + move_and_slide() if Input.is_action_just_pressed("shoot") and timeCapsule: