Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tgw3ff
2021-SP-CS4096-97-TDG
Commits
96a20804
Commit
96a20804
authored
Apr 12, 2021
by
dsxfbz
Browse files
mid-meeting
parent
c8dfbb17
Changes
2
Hide whitespace changes
Inline
Side-by-side
CS 4096-97 Top Down Game/ActorManager.gd
View file @
96a20804
...
...
@@ -52,6 +52,14 @@ func kill(actor: String):
get_node
(
"../TurnManager/OrderManager"
)
.
remove_actor
(
actor
)
remove_child
(
get_node
(
actor
))
func
knockback
(
target
:
String
,
strength
:
float
,
dir
:
String
):
for
actor
in
get_children
():
if
(
actor
.
name
==
target
):
# Move actor in given direction (dir) stength tiles
# Detect collision; deal damage equal to strength remaining if collides with wall?
break
pass
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
CS 4096-97 Top Down Game/actors/Player.gd
View file @
96a20804
...
...
@@ -30,6 +30,7 @@ func move(dir: String):
action_taken
=
true
else
:
print
(
"-Actor Collision: "
+
get_node
(
".."
)
.
get_actor_id_dir
(
name
,
dir
))
# knockback(target)
else
:
print
(
"-Collision"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment