-
Notifications
You must be signed in to change notification settings - Fork 0
16 fix enemy patrol #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
69f85bd
72d3297
f728b00
74e96e8
c970128
c8ed9d1
6a0d8a5
c652470
da3cc3a
9a42da6
cc9ff3c
e91f67d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can probably be placed in entities/enemy/ instead of common
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
|
| 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("..") |
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this file probably doesn't need to be changed
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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