Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a system specific binary -- shouldn't be added

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again, did not touched it (godot seems to do funky stuff), i'll do a pull from main to solve it

Binary file not shown.
12 changes: 12 additions & 0 deletions common/linear_path_enemy.gd

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can probably be placed in entities/enemy/ instead of common

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, i'll place it there

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends Node


@onready var path_follow : PathFollow2D = $Path2D/PathFollow2D
@export var speed = 100 # px/sec



# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
path_follow.progress += speed *delta

29 changes: 29 additions & 0 deletions common/linear_path_enemy.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[gd_scene load_steps=4 format=3 uid="uid://ck71vcigkrs0m"]

[ext_resource type="Script" path="res://common/linear_path_enemy.gd" id="1_j52ir"]
[ext_resource type="PackedScene" uid="uid://cdto1w15bi4i5" path="res://entities/enemy/Enemy.tscn" id="2_cc4nm"]

[sub_resource type="Curve2D" id="Curve2D_gnl3o"]
_data = {
"points": PackedVector2Array(0, 0, 0, 0, 1260, -7, 0, 0, 0, 0, 801, -7, 0, 0, 0, 0, 1260, -7)
}
point_count = 3

[node name="LinearPathEnemy" type="Node2D"]
script = ExtResource("1_j52ir")
metadata/_edit_group_ = true

[node name="Path2D" type="Path2D" parent="."]
position = Vector2(3, 303.07)
curve = SubResource("Curve2D_gnl3o")

[node name="PathFollow2D" type="PathFollow2D" parent="Path2D"]
position = Vector2(1260, -7)
rotation = 3.1397
rotates = false

[node name="Enemy2" parent="Path2D/PathFollow2D" node_paths=PackedStringArray("path_follow") instance=ExtResource("2_cc4nm")]
position = Vector2(202.011, 4.163)
rotation = -3.1397
walk_speed = 40.0
path_follow = NodePath("..")
20 changes: 12 additions & 8 deletions main.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=13 format=4 uid="uid://liwr5msxs8jp"]
[gd_scene load_steps=14 format=4 uid="uid://liwr5msxs8jp"]

[ext_resource type="TileSet" uid="uid://ddv2rnx0dwxf" path="res://map/tiles.tres" id="1_iaw24"]
[ext_resource type="Script" path="res://map/game_tiles.gd" id="2_5tlar"]
Expand All @@ -8,13 +8,14 @@
[ext_resource type="Script" path="res://addons/phantom_camera/scripts/resources/tween_resource.gd" id="4_qwch8"]
[ext_resource type="Script" path="res://addons/phantom_camera/scripts/phantom_camera_host/phantom_camera_host.gd" id="5_ybg0b"]
[ext_resource type="PackedScene" uid="uid://cdto1w15bi4i5" path="res://entities/enemy/Enemy.tscn" id="6_pyw4a"]
[ext_resource type="Script" path="res://common/linear_path_enemy.gd" id="6_q4w6x"]
[ext_resource type="Script" path="res://entities/killzone/killzone.gd" id="8_tjbcs"]

[sub_resource type="Curve2D" id="Curve2D_gnl3o"]
_data = {
"points": PackedVector2Array(0, 0, 0, 0, 1260, -7, 0, 0, 0, 0, 732, -6)
"points": PackedVector2Array(0, 0, 0, 0, 1260, -7, 0, 0, 0, 0, 801, -7, 0, 0, 0, 0, 1260, -7)
}
point_count = 2
point_count = 3

[sub_resource type="Resource" id="Resource_h5gmi"]
script = ExtResource("4_qwch8")
Expand All @@ -33,8 +34,6 @@ script = ExtResource("2_5tlar")

[node name="Player" parent="." instance=ExtResource("2_hjk1k")]
position = Vector2(19, -9)
collision_layer = 1
collision_mask = 1

[node name="Goal" parent="." instance=ExtResource("4_4u3ub")]
position = Vector2(1493, -25)
Expand All @@ -43,15 +42,20 @@ position = Vector2(1493, -25)
position = Vector2(553, 84)
walk_speed = 0.0

[node name="Path2D" type="Path2D" parent="."]
[node name="LinearPathEnemy" type="Node2D" parent="."]
script = ExtResource("6_q4w6x")
metadata/_edit_group_ = true

[node name="Path2D" type="Path2D" parent="LinearPathEnemy"]
position = Vector2(3, 303.07)
curve = SubResource("Curve2D_gnl3o")

[node name="PathFollow2D" type="PathFollow2D" parent="Path2D"]
[node name="PathFollow2D" type="PathFollow2D" parent="LinearPathEnemy/Path2D"]
position = Vector2(1260, -7)
rotation = 3.1397
rotates = false

[node name="Enemy2" parent="Path2D/PathFollow2D" node_paths=PackedStringArray("path_follow") instance=ExtResource("6_pyw4a")]
[node name="Enemy2" parent="LinearPathEnemy/Path2D/PathFollow2D" node_paths=PackedStringArray("path_follow") instance=ExtResource("6_pyw4a")]
position = Vector2(202.011, 4.163)
rotation = -3.1397
walk_speed = 40.0
Expand Down
2 changes: 1 addition & 1 deletion project.godot

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file probably doesn't need to be changed

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

strange cause i did not touched it (godot seems to do funky stuff), i'll do a pull from main to solve it

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ version_control/autoload_on_startup=true

[editor_plugins]

enabled=PackedStringArray("res://addons/debug_menu/plugin.cfg", "res://addons/phantom_camera/plugin.cfg", "res://addons/scene_manager/plugin.cfg", "res://addons/shaker/plugin.cfg", "res://addons/virtual_joystick/plugin.cfg")
enabled=PackedStringArray("res://addons/debug_menu/plugin.cfg", "res://addons/scene_manager/plugin.cfg", "res://addons/shaker/plugin.cfg")

[input]

Expand Down