diff --git a/addons/pronto/behaviors/PlatformerControllerBehavior.gd b/addons/pronto/behaviors/PlatformerControllerBehavior.gd index 200d6e02..47daf847 100644 --- a/addons/pronto/behaviors/PlatformerControllerBehavior.gd +++ b/addons/pronto/behaviors/PlatformerControllerBehavior.gd @@ -5,17 +5,17 @@ class_name PlatformerControllerBehavior @export_category("Gameplay") ## Defines the available controls -enum Player { - Player_1 = 0, ## A - D, W or Space to jump - Player_2 = 1, ## Arrow keys, up to jump - Player_3 = 2 ## J - L, I to jump +enum Controls { + WASD = 0, ## A - D, Jump: Space + Arrow_Keys = 1, ## Arrow keys + IJKL = 2 ## J - L, Jump: I } ## Determines which controls (keys) are used. ## Which keys that are is defined in [member PlatformControllerBehavior.key_map] ## ## See [enum PlatformControllerBehavior.Controls] for possible values -@export var player: Player = Player.Player_1 +@export var controls: Controls = Controls.Arrow_Keys ## The speed with which the character jumps. @export var jump_velocity: float = 400: set(v): @@ -49,6 +49,26 @@ var _last_positions = [] signal collided(last_collision: KinematicCollision2D) +# Make sure that these keys are identical to the comments from the enum "Controls" above when changing them. +var key_map = [{ + "function": Input.is_physical_key_pressed, + "left": KEY_A, + "right": KEY_D, + "jump": [KEY_SPACE, KEY_W] +}, +{ + "function": Input.is_action_pressed, + "left": "ui_left", + "right": "ui_right", + "jump": "ui_up" +}, +{ + "function": Input.is_physical_key_pressed, + "left": KEY_J, + "right": KEY_L, + "jump": KEY_I +}] + func _enter_tree(): if not get_parent() is CharacterBody2D: push_error("PlatformerController must be a child of a CharacterBody2D") @@ -82,12 +102,12 @@ func _draw(): for pos in _last_positions: draw_circle(pos, 3, Color.RED) -#const valid_directions = ["left", "right", "jump"] func _is_key_pressed(direction): - #if not direction in valid_directions: - #push_error("Direction must be one of {0} (got {1})".format(", ".join(valid_directions), direction)) - var action_string = "player_{0}_{1}".format([str(player), direction]) - return Input.is_action_pressed(action_string) + var keys = key_map[controls] + if (typeof(keys[direction]) == TYPE_ARRAY): + return keys[direction].any(func(key): return keys["function"].call(key)) + else: + return keys["function"].call(keys[direction]) func _physics_process(delta): if Engine.is_editor_hint(): diff --git a/prototypes/.DS_Store b/prototypes/.DS_Store new file mode 100644 index 00000000..80191d5a Binary files /dev/null and b/prototypes/.DS_Store differ diff --git a/prototypes/game-shadows-of-surveillance/.DS_Store b/prototypes/game-shadows-of-surveillance/.DS_Store new file mode 100644 index 00000000..090875a1 Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/.DS_Store differ diff --git a/prototypes/game-shadows-of-surveillance/characters/.DS_Store b/prototypes/game-shadows-of-surveillance/characters/.DS_Store new file mode 100644 index 00000000..044309e4 Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/characters/.DS_Store differ diff --git a/prototypes/game-shadows-of-surveillance/characters/Pink Man/Double Jump (32x32).png b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Double Jump (32x32).png new file mode 100644 index 00000000..c47eeef2 Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Double Jump (32x32).png differ diff --git a/prototypes/game-shadows-of-surveillance/characters/Pink Man/Double Jump (32x32).png.import b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Double Jump (32x32).png.import new file mode 100644 index 00000000..a7ac1e5d --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Double Jump (32x32).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b8yv3molmyxfb" +path="res://.godot/imported/Double Jump (32x32).png-f9c754cad5fdc07a50cad7c14c4ea11c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://prototypes/game-shadows-of-surveillance/characters/Pink Man/Double Jump (32x32).png" +dest_files=["res://.godot/imported/Double Jump (32x32).png-f9c754cad5fdc07a50cad7c14c4ea11c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/prototypes/game-shadows-of-surveillance/characters/Pink Man/Fall (32x32).png b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Fall (32x32).png new file mode 100644 index 00000000..8990b87e Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Fall (32x32).png differ diff --git a/prototypes/game-shadows-of-surveillance/characters/Pink Man/Fall (32x32).png.import b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Fall (32x32).png.import new file mode 100644 index 00000000..00212ed2 --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Fall (32x32).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dslkgcje724ld" +path="res://.godot/imported/Fall (32x32).png-dd94e3f9e148313a000034c2430cd27a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://prototypes/game-shadows-of-surveillance/characters/Pink Man/Fall (32x32).png" +dest_files=["res://.godot/imported/Fall (32x32).png-dd94e3f9e148313a000034c2430cd27a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/prototypes/game-shadows-of-surveillance/characters/Pink Man/Hit (32x32).png b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Hit (32x32).png new file mode 100644 index 00000000..5d6d0684 Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Hit (32x32).png differ diff --git a/prototypes/game-shadows-of-surveillance/characters/Pink Man/Hit (32x32).png.import b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Hit (32x32).png.import new file mode 100644 index 00000000..97a235ca --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Hit (32x32).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c2bl3q150bx1t" +path="res://.godot/imported/Hit (32x32).png-c61e5da5c9192dadeb3b4755cae32a27.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://prototypes/game-shadows-of-surveillance/characters/Pink Man/Hit (32x32).png" +dest_files=["res://.godot/imported/Hit (32x32).png-c61e5da5c9192dadeb3b4755cae32a27.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/prototypes/game-shadows-of-surveillance/characters/Pink Man/Idle (32x32).png b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Idle (32x32).png new file mode 100644 index 00000000..620ff925 Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Idle (32x32).png differ diff --git a/prototypes/game-shadows-of-surveillance/characters/Pink Man/Idle (32x32).png.import b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Idle (32x32).png.import new file mode 100644 index 00000000..6077cf26 --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Idle (32x32).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dx884i5e2o8ql" +path="res://.godot/imported/Idle (32x32).png-45efc1a7a294480c6b2834a58656718e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://prototypes/game-shadows-of-surveillance/characters/Pink Man/Idle (32x32).png" +dest_files=["res://.godot/imported/Idle (32x32).png-45efc1a7a294480c6b2834a58656718e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/prototypes/game-shadows-of-surveillance/characters/Pink Man/Jump (32x32).png b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Jump (32x32).png new file mode 100644 index 00000000..d7f69d42 Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Jump (32x32).png differ diff --git a/prototypes/game-shadows-of-surveillance/characters/Pink Man/Jump (32x32).png.import b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Jump (32x32).png.import new file mode 100644 index 00000000..be5981f0 --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Jump (32x32).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://uslhwqbdovi1" +path="res://.godot/imported/Jump (32x32).png-ada1d7faf49f934eaa12ecf6f44e732e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://prototypes/game-shadows-of-surveillance/characters/Pink Man/Jump (32x32).png" +dest_files=["res://.godot/imported/Jump (32x32).png-ada1d7faf49f934eaa12ecf6f44e732e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/prototypes/game-shadows-of-surveillance/characters/Pink Man/Run (32x32).png b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Run (32x32).png new file mode 100644 index 00000000..a5d5b9c9 Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Run (32x32).png differ diff --git a/prototypes/game-shadows-of-surveillance/characters/Pink Man/Run (32x32).png.import b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Run (32x32).png.import new file mode 100644 index 00000000..1b5a1965 --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Run (32x32).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cg51l4o67emhb" +path="res://.godot/imported/Run (32x32).png-296b368a9b666ea910c0c35d9f7d8852.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://prototypes/game-shadows-of-surveillance/characters/Pink Man/Run (32x32).png" +dest_files=["res://.godot/imported/Run (32x32).png-296b368a9b666ea910c0c35d9f7d8852.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/prototypes/game-shadows-of-surveillance/characters/Pink Man/Wall Jump (32x32).png b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Wall Jump (32x32).png new file mode 100644 index 00000000..d9f1c6ff Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Wall Jump (32x32).png differ diff --git a/prototypes/game-shadows-of-surveillance/characters/Pink Man/Wall Jump (32x32).png.import b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Wall Jump (32x32).png.import new file mode 100644 index 00000000..feeb9384 --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/Pink Man/Wall Jump (32x32).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cmfu34nhl06te" +path="res://.godot/imported/Wall Jump (32x32).png-d5061836552c1a05e8b84a05e8126919.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://prototypes/game-shadows-of-surveillance/characters/Pink Man/Wall Jump (32x32).png" +dest_files=["res://.godot/imported/Wall Jump (32x32).png-d5061836552c1a05e8b84a05e8126919.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/prototypes/game-shadows-of-surveillance/characters/PlatfomerControllerPlayer1.gd b/prototypes/game-shadows-of-surveillance/characters/PlatfomerControllerPlayer1.gd new file mode 100644 index 00000000..6ed97755 --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/PlatfomerControllerPlayer1.gd @@ -0,0 +1,153 @@ +@tool +#thumb("JoyButton") +extends Behavior +class_name PlatformerControllerPlayer1 + +@export_category("Gameplay") +## Defines the available controls +enum Controls { + WASD = 0, ## A - D, Jump: Space + Arrow_Keys = 1, ## Arrow keys + IJKL = 2 ## J - L, Jump: I +} + +## Determines which controls (keys) are used. +## Which keys that are is defined in [member PlatformControllerBehavior.key_map] +## +## See [enum PlatformControllerBehavior.Controls] for possible values +@export var controls: Controls = Controls.WASD +## The speed with which the character jumps. +@export var jump_velocity: float = 400: + set(v): + jump_velocity = v +## The speed with which the character moves sideways. +@export var horizontal_velocity: float = 400: + set(v): + horizontal_velocity = v +## The amount of time after falling off a platform where the character can still jump, in seconds. +@export_range(0.0, 1.0) var coyote_time = 0.1 +## The amount of time a jump input will trigger a jump if the character is not touching the floor, in seconds. +@export_range(0.0, 1.0) var jump_buffer = 0.1 + +@export_category("Physics") +@export var gravity_paused: bool = false: + get: return gravity_paused + set(value): gravity_paused = value + +@export_category("Debug") +## If enabled, the parent leaves a trail of recent positions. +@export var show_trail: bool = false + +@onready var _parent: CharacterBody2D = get_parent() + +var _last_on_floor = -10000 +@onready var _last_floor_height = _parent.position.y +var _last_jump_input = -10000 + +var _last_positions_max = 30 +var _last_positions = [] + +signal collided(last_collision: KinematicCollision2D) + +# Make sure that these keys are identical to the comments from the enum "Controls" above when changing them. +var key_map = [{ + "function": Input.is_physical_key_pressed, + "left": KEY_A, + "right": KEY_D, + "jump": [KEY_SPACE, KEY_W] +}, +{ + "function": Input.is_action_pressed, + "left": "ui_left", + "right": "ui_right", + "jump": "ui_up" +}, +{ + "function": Input.is_physical_key_pressed, + "left": KEY_J, + "right": KEY_L, + "jump": KEY_I +}] + +func _enter_tree(): + if not get_parent() is CharacterBody2D: + push_error("PlatformerController must be a child of a CharacterBody2D") + +func _update_jump(): + var now = Time.get_ticks_msec() + + if _parent.is_on_floor(): + _last_on_floor = now + _last_floor_height = _parent.position.y + + if _is_key_pressed("jump"): + _last_jump_input = now + +func _can_jump(): + var now = Time.get_ticks_msec() + var input = _last_jump_input > now - 1000 * jump_buffer + var floored = _last_on_floor > now - 1000 * coyote_time + return input and floored + +func _reset_jump(): + _last_jump_input = -10000 + _last_on_floor = -10000 + +func _draw(): + super._draw() + if !show_trail: + return + + draw_set_transform(-position - _parent.position) + for pos in _last_positions: + draw_circle(pos, 3, Color.RED) + +func _is_key_pressed(direction): + var keys = key_map[controls] + if (typeof(keys[direction]) == TYPE_ARRAY): + return keys[direction].any(func(key): return keys["function"].call(key)) + else: + return keys["function"].call(keys[direction]) + +func _physics_process(delta): + if Engine.is_editor_hint(): + return + + var gravity = PhysicsServer2D.body_get_direct_state(_parent).total_gravity + if gravity_paused: + gravity = Vector2.ZERO + + # vertical + _update_jump() + if _can_jump(): + _reset_jump() + if _parent.position.y > _last_floor_height: + _parent.position.y = _last_floor_height + _parent.velocity.y = -jump_velocity + else: + _parent.velocity.y += gravity.y * delta + + # horizontal + var input_direction_x = 0 + if _is_key_pressed("left"): + input_direction_x += -1 + if _is_key_pressed("right"): + input_direction_x += 1 + _parent.velocity.x = input_direction_x * horizontal_velocity + _parent.velocity.x += gravity.x * delta + + # move + var did_collide = _parent.move_and_slide() + + if did_collide: + collided.emit(_parent.get_last_slide_collision()) + + # trail + _last_positions.append(_parent.position) + if _last_positions.size() > _last_positions_max: + _last_positions.pop_front() + + queue_redraw() + +func lines(): + return super.lines() + [Lines.DashedLine.new(self, get_parent(), func (f): return "controls", "controls")] diff --git a/prototypes/game-shadows-of-surveillance/characters/PlatformerControllerPlayer2.gd b/prototypes/game-shadows-of-surveillance/characters/PlatformerControllerPlayer2.gd new file mode 100644 index 00000000..1983993a --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/PlatformerControllerPlayer2.gd @@ -0,0 +1,153 @@ +@tool +#thumb("JoyButton") +extends Behavior +class_name PlatformerControllerPlayer2 + +@export_category("Gameplay") +## Defines the available controls +enum Controls { + WASD = 0, ## A - D, Jump: Space + Arrow_Keys = 1, ## Arrow keys + IJKL = 2 ## J - L, Jump: I +} + +## Determines which controls (keys) are used. +## Which keys that are is defined in [member PlatformControllerBehavior.key_map] +## +## See [enum PlatformControllerBehavior.Controls] for possible values +@export var controls: Controls = Controls.Arrow_Keys +## The speed with which the character jumps. +@export var jump_velocity: float = 400: + set(v): + jump_velocity = v +## The speed with which the character moves sideways. +@export var horizontal_velocity: float = 400: + set(v): + horizontal_velocity = v +## The amount of time after falling off a platform where the character can still jump, in seconds. +@export_range(0.0, 1.0) var coyote_time = 0.1 +## The amount of time a jump input will trigger a jump if the character is not touching the floor, in seconds. +@export_range(0.0, 1.0) var jump_buffer = 0.1 + +@export_category("Physics") +@export var gravity_paused: bool = false: + get: return gravity_paused + set(value): gravity_paused = value + +@export_category("Debug") +## If enabled, the parent leaves a trail of recent positions. +@export var show_trail: bool = false + +@onready var _parent: CharacterBody2D = get_parent() + +var _last_on_floor = -10000 +@onready var _last_floor_height = _parent.position.y +var _last_jump_input = -10000 + +var _last_positions_max = 30 +var _last_positions = [] + +signal collided(last_collision: KinematicCollision2D) + +# Make sure that these keys are identical to the comments from the enum "Controls" above when changing them. +var key_map = [{ + "function": Input.is_physical_key_pressed, + "left": KEY_A, + "right": KEY_D, + "jump": [KEY_SPACE, KEY_W] +}, +{ + "function": Input.is_action_pressed, + "left": "ui_left", + "right": "ui_right", + "jump": "ui_up" +}, +{ + "function": Input.is_physical_key_pressed, + "left": KEY_J, + "right": KEY_L, + "jump": KEY_I +}] + +func _enter_tree(): + if not get_parent() is CharacterBody2D: + push_error("PlatformerController must be a child of a CharacterBody2D") + +func _update_jump(): + var now = Time.get_ticks_msec() + + if _parent.is_on_floor(): + _last_on_floor = now + _last_floor_height = _parent.position.y + + if _is_key_pressed("jump"): + _last_jump_input = now + +func _can_jump(): + var now = Time.get_ticks_msec() + var input = _last_jump_input > now - 1000 * jump_buffer + var floored = _last_on_floor > now - 1000 * coyote_time + return input and floored + +func _reset_jump(): + _last_jump_input = -10000 + _last_on_floor = -10000 + +func _draw(): + super._draw() + if !show_trail: + return + + draw_set_transform(-position - _parent.position) + for pos in _last_positions: + draw_circle(pos, 3, Color.RED) + +func _is_key_pressed(direction): + var keys = key_map[controls] + if (typeof(keys[direction]) == TYPE_ARRAY): + return keys[direction].any(func(key): return keys["function"].call(key)) + else: + return keys["function"].call(keys[direction]) + +func _physics_process(delta): + if Engine.is_editor_hint(): + return + + var gravity = PhysicsServer2D.body_get_direct_state(_parent).total_gravity + if gravity_paused: + gravity = Vector2.ZERO + + # vertical + _update_jump() + if _can_jump(): + _reset_jump() + if _parent.position.y > _last_floor_height: + _parent.position.y = _last_floor_height + _parent.velocity.y = -jump_velocity + else: + _parent.velocity.y += gravity.y * delta + + # horizontal + var input_direction_x = 0 + if _is_key_pressed("left"): + input_direction_x += -1 + if _is_key_pressed("right"): + input_direction_x += 1 + _parent.velocity.x = input_direction_x * horizontal_velocity + _parent.velocity.x += gravity.x * delta + + # move + var did_collide = _parent.move_and_slide() + + if did_collide: + collided.emit(_parent.get_last_slide_collision()) + + # trail + _last_positions.append(_parent.position) + if _last_positions.size() > _last_positions_max: + _last_positions.pop_front() + + queue_redraw() + +func lines(): + return super.lines() + [Lines.DashedLine.new(self, get_parent(), func (f): return "controls", "controls")] diff --git a/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Double Jump (32x32).png b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Double Jump (32x32).png new file mode 100644 index 00000000..aa310820 Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Double Jump (32x32).png differ diff --git a/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Double Jump (32x32).png.import b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Double Jump (32x32).png.import new file mode 100644 index 00000000..7e8a44fc --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Double Jump (32x32).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bxpruxtl88tug" +path="res://.godot/imported/Double Jump (32x32).png-87889b2e1cb80d5ef4dc6e1845f120ae.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Double Jump (32x32).png" +dest_files=["res://.godot/imported/Double Jump (32x32).png-87889b2e1cb80d5ef4dc6e1845f120ae.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Fall (32x32).png b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Fall (32x32).png new file mode 100644 index 00000000..4af21e64 Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Fall (32x32).png differ diff --git a/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Fall (32x32).png.import b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Fall (32x32).png.import new file mode 100644 index 00000000..7b6f0205 --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Fall (32x32).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cb0tg482ymgrl" +path="res://.godot/imported/Fall (32x32).png-78f9629f3b619c1e6cccdc9efe08ee56.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Fall (32x32).png" +dest_files=["res://.godot/imported/Fall (32x32).png-78f9629f3b619c1e6cccdc9efe08ee56.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Hit (32x32).png b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Hit (32x32).png new file mode 100644 index 00000000..5036795d Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Hit (32x32).png differ diff --git a/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Hit (32x32).png.import b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Hit (32x32).png.import new file mode 100644 index 00000000..e9f9db41 --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Hit (32x32).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b8pelfqe38o1g" +path="res://.godot/imported/Hit (32x32).png-728bcbaf8329abc5e0ee24d41550221f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Hit (32x32).png" +dest_files=["res://.godot/imported/Hit (32x32).png-728bcbaf8329abc5e0ee24d41550221f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Idle (32x32).png b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Idle (32x32).png new file mode 100644 index 00000000..d5b2e580 Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Idle (32x32).png differ diff --git a/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Idle (32x32).png.import b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Idle (32x32).png.import new file mode 100644 index 00000000..0e207aad --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Idle (32x32).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cfemjjj52u7tw" +path="res://.godot/imported/Idle (32x32).png-e89acc1d00e71dcc43a8846771d3cba1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Idle (32x32).png" +dest_files=["res://.godot/imported/Idle (32x32).png-e89acc1d00e71dcc43a8846771d3cba1.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Jump (32x32).png b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Jump (32x32).png new file mode 100644 index 00000000..84177603 Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Jump (32x32).png differ diff --git a/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Jump (32x32).png.import b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Jump (32x32).png.import new file mode 100644 index 00000000..4b482d57 --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Jump (32x32).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bc25axqn25plt" +path="res://.godot/imported/Jump (32x32).png-95ad0e064d8d90c8189e36a9723a31cd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Jump (32x32).png" +dest_files=["res://.godot/imported/Jump (32x32).png-95ad0e064d8d90c8189e36a9723a31cd.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Run (32x32).png b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Run (32x32).png new file mode 100644 index 00000000..de4d53e5 Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Run (32x32).png differ diff --git a/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Run (32x32).png.import b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Run (32x32).png.import new file mode 100644 index 00000000..2ee20265 --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Run (32x32).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bs2rvuy453dme" +path="res://.godot/imported/Run (32x32).png-490f52c9d465474edb22260f7b78e807.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Run (32x32).png" +dest_files=["res://.godot/imported/Run (32x32).png-490f52c9d465474edb22260f7b78e807.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Wall Jump (32x32).png b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Wall Jump (32x32).png new file mode 100644 index 00000000..8458b296 Binary files /dev/null and b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Wall Jump (32x32).png differ diff --git a/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Wall Jump (32x32).png.import b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Wall Jump (32x32).png.import new file mode 100644 index 00000000..ffd0f214 --- /dev/null +++ b/prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Wall Jump (32x32).png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b7inttt3wss6c" +path="res://.godot/imported/Wall Jump (32x32).png-f88a8bc6f171845ee7ac518b8f1db07a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://prototypes/game-shadows-of-surveillance/characters/Virtual Guy/Wall Jump (32x32).png" +dest_files=["res://.godot/imported/Wall Jump (32x32).png-f88a8bc6f171845ee7ac518b8f1db07a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/prototypes/game-shadows-of-surveillance/characters/player1.tscn b/prototypes/game-shadows-of-surveillance/characters/player1.tscn index a1db43a1..24b652a1 100644 --- a/prototypes/game-shadows-of-surveillance/characters/player1.tscn +++ b/prototypes/game-shadows-of-surveillance/characters/player1.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=4 format=3 uid="uid://c5c24526dtufn"] -[ext_resource type="Texture2D" uid="uid://b6etujec8ohme" path="res://prototypes/game-shadows-of-surveillance/assets/david_player1.png" id="1_3bxhg"] -[ext_resource type="Script" path="res://addons/pronto/behaviors/PlatformerControllerBehavior.gd" id="2_4o648"] +[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/PlatfomerControllerPlayer1.gd" id="2_opehh"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_h8f81"] radius = 12.1039 @@ -10,15 +10,16 @@ height = 137.594 [node name="Player1" type="CharacterBody2D"] [node name="DavidPlayer1" type="Sprite2D" parent="."] -position = Vector2(28, -5) -scale = Vector2(0.591623, 0.591623) -texture = ExtResource("1_3bxhg") +position = Vector2(0, 4.76837e-07) +scale = Vector2(1, 1.0625) +texture = ExtResource("1_am0mg") +hframes = 11 [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2(-1, 12) -scale = Vector2(3.55259, 1.54803) +position = Vector2(0, 4) +scale = Vector2(0.912592, 0.18803) shape = SubResource("CapsuleShape2D_h8f81") -[node name="PlatformerControllerBehavior" type="Node2D" parent="."] +[node name="PlatformerControllerPlayer1" type="Node2D" parent="."] position = Vector2(576, 324) -script = ExtResource("2_4o648") +script = ExtResource("2_opehh") diff --git a/prototypes/game-shadows-of-surveillance/characters/player2.tscn b/prototypes/game-shadows-of-surveillance/characters/player2.tscn index 3cb55291..255755f7 100644 --- a/prototypes/game-shadows-of-surveillance/characters/player2.tscn +++ b/prototypes/game-shadows-of-surveillance/characters/player2.tscn @@ -1,8 +1,7 @@ -[gd_scene load_steps=6 format=3 uid="uid://dxp4mlvvs0g2"] +[gd_scene load_steps=5 format=3 uid="uid://dxp4mlvvs0g2"] -[ext_resource type="Script" path="res://prototypes/game-shadows-of-surveillance/scripts/player2.gd" id="1_dryno"] -[ext_resource type="Texture2D" uid="uid://chiivrwridrdd" path="res://prototypes/game-shadows-of-surveillance/assets/ole_player2.jpg" id="2_s085l"] -[ext_resource type="Script" path="res://addons/pronto/behaviors/PlatformerControllerBehavior.gd" id="3_mgoso"] +[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://ch6w3mr4w7ueu" path="res://LightSprite.png" id="4_u5jrv"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_7cbuj"] @@ -11,26 +10,24 @@ height = 248.062 [node name="Player2" type="CharacterBody2D" groups=["player"]] scale = Vector2(0.258, 0.258) collision_layer = 3 -script = ExtResource("1_dryno") [node name="OlePlayer2" type="Sprite2D" parent="."] -position = Vector2(7.75194, 7.75195) -scale = Vector2(0.269467, 0.269467) -texture = ExtResource("2_s085l") +scale = Vector2(1, 1.10562) +texture = ExtResource("2_3wlyp") +hframes = 11 +frame = 10 [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2(11.6279, 38.7597) -scale = Vector2(5.96124, 1) +position = Vector2(0, 3.87597) +scale = Vector2(1, 0.11) shape = SubResource("CapsuleShape2D_7cbuj") -[node name="PlatformerControllerBehavior" type="Node2D" parent="."] -position = Vector2(576, 324) -script = ExtResource("3_mgoso") -player = 1 - [node name="Marker2D" type="Marker2D" parent="."] -position = Vector2(-54.2636, 38.7597) [node name="Flashlight" type="PointLight2D" parent="." groups=["light"]] -position = Vector2(3.87598, 31.0078) +scale = Vector2(0.22, 0.22) texture = ExtResource("4_u5jrv") + +[node name="PlatformerControllerBehavior2" type="Node2D" parent="."] +position = Vector2(576, 324) +script = ExtResource("3_kwpqc") diff --git a/prototypes/game-shadows-of-surveillance/levels/game_info.json b/prototypes/game-shadows-of-surveillance/levels/game_info.json index 37ad6630..2176007f 100644 --- a/prototypes/game-shadows-of-surveillance/levels/game_info.json +++ b/prototypes/game-shadows-of-surveillance/levels/game_info.json @@ -5,6 +5,6 @@ "Matvey Sivashinski" ], "description": "You are a brilliant scientist who just discovered time travel. Unfortunately, during your first test, something goes wrong and your mind is split into two parts, one part travels to the future and one is stuck in the present. \nIn this coop split screen game, your goal is to somehow recombine the two parts of your mind. But be careful: In the future, some things have changed...", - "time": "2024-01-29", + "time": "2024-02-05", "title": "Shadows of Surveillance" } \ No newline at end of file diff --git a/prototypes/game-shadows-of-surveillance/levels/level.tscn b/prototypes/game-shadows-of-surveillance/levels/level.tscn index db76e20a..d1e87f66 100644 --- a/prototypes/game-shadows-of-surveillance/levels/level.tscn +++ b/prototypes/game-shadows-of-surveillance/levels/level.tscn @@ -12,7 +12,7 @@ [node name="Background" type="Sprite2D" parent="."] position = Vector2(577, 323.5) -scale = Vector2(0.499132, 0.500772) +scale = Vector2(2.5, 2.51) texture = ExtResource("1_elldh") [node name="LightSwitch" type="Area2D" parent="." groups=["button"]] @@ -29,7 +29,8 @@ sprite_texture = ExtResource("4_rqfal") placeholder_size = Vector2(20, 20) [node name="Player1" parent="." groups=["player"] instance=ExtResource("3_x2hlg")] -position = Vector2(99, 467) +position = Vector2(101, 565) +scale = Vector2(1.5, 1.5) collision_layer = 3 collision_mask = 3 @@ -41,6 +42,6 @@ limit_to_group = "button" [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, 7, 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, 589824, 7, 2490393, 589824, 7, 2555928, 524288, 7, 2621464, 524288, 7, 2490392, 524288, 6, 2555929, 589824, 7, 2621465, 589824, 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) +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) [connection signal="body_entered" from="LightSwitch" to="Player1/LightSwitchBehavior" method="_on_area_2d_body_entered"] diff --git a/prototypes/game-shadows-of-surveillance/levels/level2.tscn b/prototypes/game-shadows-of-surveillance/levels/level2.tscn index 27097864..463b62a8 100644 --- a/prototypes/game-shadows-of-surveillance/levels/level2.tscn +++ b/prototypes/game-shadows-of-surveillance/levels/level2.tscn @@ -10,7 +10,7 @@ [node name="6" type="Sprite2D" parent="."] position = Vector2(578, 319) -scale = Vector2(2.01189, 2.01189) +scale = Vector2(3.5, 3.5) texture = ExtResource("1_j6sv0") [node name="CanvasModulate" type="CanvasModulate" parent="6" groups=["dark"]] @@ -18,13 +18,11 @@ color = Color(0, 0, 0, 1) [node name="TileMap" parent="." instance=ExtResource("2_llo4g")] tile_set = ExtResource("3_ko4tt") -layer_0/tile_data = PackedInt32Array(1966089, 0, 0, 1966090, 65536, 0, 1966091, 65536, 0, 1966092, 65536, 0, 1966093, 65536, 0, 1966094, 65536, 0, 1966095, 65536, 0, 1966096, 65536, 0, 1966097, 65536, 0, 1966098, 65536, 0, 1966099, 65536, 0, 1966100, 65536, 0, 1966101, 65536, 0, 1966102, 65536, 0, 1966103, 65536, 0, 1966104, 65536, 0, 1966105, 65536, 0, 1966106, 65536, 0, 1966107, 65536, 0, 1966108, 65536, 0, 1966109, 65536, 0, 1966110, 131072, 0, 2031646, 131072, 1, 2097182, 131072, 1, 2162718, 131072, 1, 2031625, 0, 1, 2097161, 0, 1, 2162697, 0, 1, 2031626, 65536, 1, 2031627, 65536, 1, 2097164, 65536, 1, 2097165, 65536, 1, 2097166, 65536, 1, 2097167, 65536, 1, 2097168, 65536, 1, 2162705, 65536, 1, 2162706, 65536, 1, 2162707, 65536, 1, 2162708, 65536, 1, 2162709, 65536, 1, 2162710, 65536, 1, 2162711, 65536, 1, 2162712, 65536, 1, 2162713, 65536, 1, 2162714, 65536, 1, 2162715, 65536, 1, 2162716, 65536, 1, 2162717, 65536, 1, 2097181, 65536, 1, 2031645, 65536, 1, 2031644, 65536, 1, 2031643, 65536, 1, 2031642, 65536, 1, 2031641, 65536, 1, 2031640, 65536, 1, 2031639, 65536, 1, 2031638, 65536, 1, 2031637, 65536, 1, 2031636, 65536, 1, 2031635, 65536, 1, 2097170, 65536, 1, 2097169, 65536, 1, 2097163, 65536, 1, 2031629, 65536, 1, 2031628, 65536, 1, 2031630, 65536, 1, 2031631, 65536, 1, 2031632, 65536, 1, 2031633, 65536, 1, 2031634, 65536, 1, 2097171, 65536, 1, 2097172, 65536, 1, 2097173, 65536, 1, 2097174, 65536, 1, 2097175, 65536, 1, 2097176, 65536, 1, 2097177, 65536, 1, 2097178, 65536, 1, 2097179, 65536, 1, 2097180, 65536, 1, 2162704, 65536, 1, 2162703, 65536, 1, 2097162, 65536, 1, 2162698, 65536, 1, 2162699, 65536, 1, 2162701, 65536, 1, 2162702, 65536, 1, 2162700, 65536, 1, 1966115, 0, 0, 1966116, 65536, 0, 1966128, 65536, 0, 1966117, 65536, 0, 1966118, 65536, 0, 2031655, 65536, 1, 2031656, 65536, 1, 2031657, 65536, 1, 2031658, 65536, 1, 2031659, 65536, 1, 2031660, 65536, 1, 2031661, 65536, 1, 2031662, 65536, 1, 2031663, 65536, 1, 2031664, 65536, 1, 2031665, 65536, 1, 2031666, 65536, 1, 1966119, 65536, 0, 1966120, 65536, 0, 1966121, 65536, 0, 1966122, 65536, 0, 1966123, 65536, 0, 1966124, 65536, 0, 1966125, 65536, 0, 1966126, 65536, 0, 1966127, 65536, 0, 1966129, 65536, 0, 1966130, 65536, 0, 1966131, 65536, 0, 1966132, 65536, 0, 1966133, 65536, 0, 1966134, 65536, 0, 1966135, 65536, 0, 1966136, 65536, 0, 1966137, 65536, 0, 1966138, 65536, 0, 1966139, 65536, 0, 2031652, 65536, 1, 2031653, 65536, 1, 2031654, 65536, 1, 2031667, 65536, 1, 2031668, 65536, 1, 2031669, 65536, 1, 2031670, 65536, 1, 2031671, 65536, 1, 2031672, 65536, 1, 2031673, 65536, 1, 2031674, 65536, 1, 2097210, 65536, 1, 2162746, 65536, 1, 2162745, 65536, 1, 2162744, 65536, 1, 2097207, 65536, 1, 2097206, 65536, 1, 2097205, 65536, 1, 2097204, 65536, 1, 2097203, 65536, 1, 2097202, 65536, 1, 2097201, 65536, 1, 2097200, 65536, 1, 2097199, 65536, 1, 2097198, 65536, 1, 2097197, 65536, 1, 2097196, 65536, 1, 2097195, 65536, 1, 2097194, 65536, 1, 2097193, 65536, 1, 2097192, 65536, 1, 2097191, 65536, 1, 2097190, 65536, 1, 2097189, 65536, 1, 2097188, 65536, 1, 2097187, 0, 1, 2162723, 0, 1, 2162724, 65536, 1, 2162725, 65536, 1, 2162726, 65536, 1, 2162727, 65536, 1, 2162732, 65536, 1, 2162733, 65536, 1, 2162734, 65536, 1, 2162735, 65536, 1, 2162736, 65536, 1, 2162737, 65536, 1, 2162738, 65536, 1, 2162739, 65536, 1, 2162740, 65536, 1, 2162741, 65536, 1, 2162742, 65536, 1, 2162743, 65536, 1, 2097209, 65536, 1, 2097208, 65536, 1, 2162731, 65536, 1, 2162730, 65536, 1, 2162729, 65536, 1, 2162728, 65536, 1, 2031675, 65536, 1, 2097211, 65536, 1, 2162747, 65536, 1, 2031651, 0, 1, 2228259, 0, 1, 2031676, 131072, 1, 2097212, 131072, 1, 2162748, 131072, 1, 2228284, 131072, 1, 2293820, 131072, 1, 1966140, 131072, 0, 2228254, 65536, 0, 2293790, 65536, 0, 2293791, 65536, 0, 2293792, 65536, 0, 2293793, 65536, 0, 2293794, 65536, 0, 2293795, 65536, 0, 1900552, 131072, 1, 1835016, 131072, 1, 1769480, 131072, 1, 1703944, 131072, 1, 1638408, 131072, 1, 1572872, 131072, 1, 1507336, 131072, 1, 1441800, 131072, 1, 1376264, 131072, 1, 1310728, 131072, 1, 1245192, 131072, 1, 1179655, 131072, 1, 1114119, 131072, 1, 1048583, 131072, 1, 983047, 131072, 1, 917511, 131072, 1, 851975, 131072, 1, 786439, 131072, 1, 786438, 131072, 1, 720902, 131072, 1, 655366, 131072, 1, 1179656, 131072, 1, 1114120, 131072, 1, 1048584, 131072, 1, 983048, 131072, 1, 917512, 131072, 1, 851976, 131072, 1, 786440, 131072, 1, 720904, 131072, 1, 655368, 131072, 1, 589832, 131072, 1, 524296, 131072, 1, 458760, 131072, 1, 393224, 131072, 1, 327688, 131072, 1, 262152, 131072, 1, 196616, 131072, 1, 131080, 131072, 1, 1900605, 0, 1, 1835069, 0, 1, 1769532, 0, 1, 1703996, 0, 1, 1638460, 0, 1, 1572924, 0, 1, 1507388, 0, 1, 1441852, 0, 1, 1376316, 0, 1, 1310780, 0, 1, 1245244, 0, 1, 1179708, 0, 1, 1114172, 0, 1, 1048636, 0, 1, 983100, 0, 1, 917564, 0, 1, 852028, 0, 1, 786492, 0, 1, 720956, 0, 1, 655420, 0, 1, 589884, 0, 1, 524348, 0, 1, 458812, 0, 1, 1835068, 0, 1, 1900604, 0, 1) - -[node name="drone1" parent="." instance=ExtResource("4_m1bym")] -position = Vector2(906, 328) +layer_0/tile_data = PackedInt32Array(1966089, 0, 0, 1966090, 65536, 0, 1966091, 65536, 0, 1966092, 65536, 0, 1966093, 65536, 0, 1966094, 65536, 0, 1966095, 65536, 0, 1966096, 65536, 0, 1966097, 65536, 0, 1966098, 65536, 0, 1966099, 65536, 0, 1966100, 65536, 0, 1966101, 65536, 0, 1966102, 65536, 0, 1966103, 65536, 0, 1966104, 65536, 0, 1966105, 65536, 0, 1966106, 65536, 0, 1966107, 65536, 0, 1966108, 65536, 0, 1966109, 65536, 0, 1966110, 65536, 0, 2031646, 65536, 1, 2097182, 65536, 1, 2162718, 65536, 1, 2031625, 0, 1, 2097161, 0, 1, 2162697, 0, 1, 2031626, 65536, 1, 2031627, 65536, 1, 2097164, 65536, 1, 2097165, 65536, 1, 2097166, 65536, 1, 2097167, 65536, 1, 2097168, 65536, 1, 2162705, 65536, 1, 2162706, 65536, 1, 2162707, 65536, 1, 2162708, 65536, 1, 2162709, 65536, 1, 2162710, 65536, 1, 2162711, 65536, 1, 2162712, 65536, 1, 2162713, 65536, 1, 2162714, 65536, 1, 2162715, 65536, 1, 2162716, 65536, 1, 2162717, 65536, 1, 2097181, 65536, 1, 2031645, 65536, 1, 2031644, 65536, 1, 2031643, 65536, 1, 2031642, 65536, 1, 2031641, 65536, 1, 2031640, 65536, 1, 2031639, 65536, 1, 2031638, 65536, 1, 2031637, 65536, 1, 2031636, 65536, 1, 2031635, 65536, 1, 2097170, 65536, 1, 2097169, 65536, 1, 2097163, 65536, 1, 2031629, 65536, 1, 2031628, 65536, 1, 2031630, 65536, 1, 2031631, 65536, 1, 2031632, 65536, 1, 2031633, 65536, 1, 2031634, 65536, 1, 2097171, 65536, 1, 2097172, 65536, 1, 2097173, 65536, 1, 2097174, 65536, 1, 2097175, 65536, 1, 2097176, 65536, 1, 2097177, 65536, 1, 2097178, 65536, 1, 2097179, 65536, 1, 2097180, 65536, 1, 2162704, 65536, 1, 2162703, 65536, 1, 2097162, 65536, 1, 2162698, 65536, 1, 2162699, 65536, 1, 2162701, 65536, 1, 2162702, 65536, 1, 2162700, 65536, 1, 1966115, 65536, 0, 1966116, 65536, 0, 1966128, 65536, 0, 1966117, 65536, 0, 1966118, 65536, 0, 2031655, 65536, 1, 2031656, 65536, 1, 2031657, 65536, 1, 2031658, 65536, 1, 2031659, 65536, 1, 2031660, 65536, 1, 2031661, 65536, 1, 2031662, 65536, 1, 2031663, 65536, 1, 2031664, 65536, 1, 2031665, 65536, 1, 2031666, 65536, 1, 1966119, 65536, 0, 1966120, 65536, 0, 1966121, 65536, 0, 1966122, 65536, 0, 1966123, 65536, 0, 1966124, 65536, 0, 1966125, 65536, 0, 1966126, 65536, 0, 1966127, 65536, 0, 1966129, 65536, 0, 1966130, 65536, 0, 1966131, 65536, 0, 1966132, 65536, 0, 1966133, 65536, 0, 1966134, 65536, 0, 1966135, 65536, 0, 1966136, 65536, 0, 1966137, 65536, 0, 1966138, 65536, 0, 1966139, 65536, 0, 2031652, 65536, 1, 2031653, 65536, 1, 2031654, 65536, 1, 2031667, 65536, 1, 2031668, 65536, 1, 2031669, 65536, 1, 2031670, 65536, 1, 2031671, 65536, 1, 2031672, 65536, 1, 2031673, 65536, 1, 2031674, 65536, 1, 2097210, 65536, 1, 2162746, 65536, 1, 2162745, 65536, 1, 2162744, 65536, 1, 2097207, 65536, 1, 2097206, 65536, 1, 2097205, 65536, 1, 2097204, 65536, 1, 2097203, 65536, 1, 2097202, 65536, 1, 2097201, 65536, 1, 2097200, 65536, 1, 2097199, 65536, 1, 2097198, 65536, 1, 2097197, 65536, 1, 2097196, 65536, 1, 2097195, 65536, 1, 2097194, 65536, 1, 2097193, 65536, 1, 2097192, 65536, 1, 2097191, 65536, 1, 2097190, 65536, 1, 2097189, 65536, 1, 2097188, 65536, 1, 2097187, 65536, 1, 2162723, 65536, 1, 2162724, 65536, 1, 2162725, 65536, 1, 2162726, 65536, 1, 2162727, 65536, 1, 2162732, 65536, 1, 2162733, 65536, 1, 2162734, 65536, 1, 2162735, 65536, 1, 2162736, 65536, 1, 2162737, 65536, 1, 2162738, 65536, 1, 2162739, 65536, 1, 2162740, 65536, 1, 2162741, 65536, 1, 2162742, 65536, 1, 2162743, 65536, 1, 2097209, 65536, 1, 2097208, 65536, 1, 2162731, 65536, 1, 2162730, 65536, 1, 2162729, 65536, 1, 2162728, 65536, 1, 2031675, 65536, 1, 2097211, 65536, 1, 2162747, 65536, 1, 2031651, 65536, 1, 2228259, 65536, 1, 2031676, 131072, 1, 2097212, 131072, 1, 2162748, 131072, 1, 2228284, 131072, 2, 1966140, 131072, 0, 2228254, 65536, 1, 2293790, 0, 2, 2293791, 65536, 2, 2293792, 65536, 2, 2293793, 65536, 2, 2293794, 65536, 2, 2293795, 131072, 2, 1900552, 458752, 1, 1835016, 458752, 1, 1769480, 458752, 1, 1703944, 458752, 1, 1638408, 458752, 1, 1572872, 458752, 1, 1507336, 458752, 1, 1441800, 458752, 1, 1376264, 458752, 1, 1310728, 458752, 1, 1245192, 458752, 1, 1179656, 458752, 1, 1114120, 458752, 1, 1048584, 458752, 1, 983048, 458752, 1, 917512, 458752, 1, 851976, 458752, 1, 786440, 458752, 1, 720904, 458752, 1, 655368, 458752, 1, 589832, 458752, 1, 524296, 458752, 1, 458760, 458752, 1, 393224, 458752, 1, 327688, 458752, 1, 262152, 458752, 1, 196616, 458752, 1, 131080, 458752, 1, 1507388, 458752, 1, 1441852, 458752, 1, 1376316, 458752, 1, 1310780, 458752, 1, 1245244, 458752, 1, 1179708, 458752, 1, 1114172, 458752, 1, 1048636, 458752, 1, 983100, 458752, 1, 917564, 458752, 1, 852028, 458752, 1, 786492, 458752, 1, 720956, 458752, 1, 655420, 458752, 1, 589884, 458752, 1, 524348, 458752, 1, 458812, 458752, 1, 1900604, 458752, 2, 2228233, 0, 2, 2228234, 65536, 2, 2228235, 65536, 2, 2228236, 65536, 2, 2228237, 65536, 2, 2228238, 65536, 2, 2228239, 65536, 2, 2228240, 65536, 2, 2228241, 65536, 2, 2228242, 65536, 2, 2228243, 65536, 2, 2228244, 65536, 2, 2228245, 65536, 2, 2228246, 65536, 2, 2228247, 65536, 2, 2228248, 65536, 2, 2228249, 65536, 2, 2228250, 65536, 2, 2228251, 65536, 2, 2228252, 65536, 2, 2228253, 65536, 2, 2228260, 65536, 2, 2228261, 65536, 2, 2228262, 65536, 2, 2228263, 65536, 2, 2228264, 65536, 2, 2228265, 65536, 2, 2228266, 65536, 2, 2228267, 65536, 2, 2228268, 65536, 2, 2228269, 65536, 2, 2228270, 65536, 2, 2228271, 65536, 2, 2228272, 65536, 2, 2228273, 65536, 2, 2228274, 65536, 2, 2228275, 65536, 2, 2228276, 65536, 2, 2228277, 65536, 2, 2228278, 65536, 2, 2228279, 65536, 2, 2228280, 65536, 2, 2228281, 65536, 2, 2228282, 65536, 2, 2228283, 65536, 2, 1966088, 458752, 2, 65544, 458752, 0, 1835068, 458752, 1, 1769532, 458752, 1, 1703996, 458752, 1, 1638460, 458752, 1, 1572924, 458752, 1, 393276, 458752, 0) [node name="drone2" parent="." instance=ExtResource("4_m1bym")] position = Vector2(932, -32) [node name="Player2" parent="." instance=ExtResource("5_a7n2h")] -position = Vector2(409, 397) +position = Vector2(294, 440) +scale = Vector2(1.5, 1.5) diff --git a/prototypes/game-shadows-of-surveillance/levels/thumbnail.png b/prototypes/game-shadows-of-surveillance/levels/thumbnail.png index d0e0b151..bb852c80 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 7165ae97..f2740ffe 100644 --- a/prototypes/game-shadows-of-surveillance/scripts/drone.gd +++ b/prototypes/game-shadows-of-surveillance/scripts/drone.gd @@ -11,7 +11,7 @@ var player var shootingTimer = 0 func _ready(): - player = get_parent().get_node("Player2") + player = get_parent().get_node("Player1") print(player) func _physics_process(delta): @@ -32,7 +32,7 @@ func _physics_process(delta): velocity.x = move_toward(velocity.x, 0, SPEED) if player: - var distanceToPlayer = position.distance_to(player.position) +l var distanceToPlayer = position.distance_to(player.position) print(distanceToPlayer) if distanceToPlayer > 200: shootingTimer += delta diff --git a/prototypes/game-shadows-of-surveillance/scripts/player2.gd b/prototypes/game-shadows-of-surveillance/scripts/player2.gd index 51025d9a..8303e600 100644 --- a/prototypes/game-shadows-of-surveillance/scripts/player2.gd +++ b/prototypes/game-shadows-of-surveillance/scripts/player2.gd @@ -16,8 +16,9 @@ func _physics_process(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. + # 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: