From 469111223da475e02aa689776fde0111c6b04b98 Mon Sep 17 00:00:00 2001 From: ronny abraham Date: Wed, 27 Nov 2024 05:20:17 +0200 Subject: [PATCH] update --- ch01/lesson-12.org | 6 +++++- cho1/lesson-13.org | 40 ++++++++++++++++++++++++++++++++++++++++ toc.org | 1 + 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 cho1/lesson-13.org diff --git a/ch01/lesson-12.org b/ch01/lesson-12.org index 79e6ae8..460eb7c 100644 --- a/ch01/lesson-12.org +++ b/ch01/lesson-12.org @@ -208,9 +208,13 @@ func _physics_process(delta): - duplicate the current animation - modify and set whatever properties are necessary for each animation -** modify script +*** modify script - set the animations variable from $AnimatedSprite2D to $AnimationPlayer +** adding hurt to hit box collision +*** hit box +- Player->hurtBox->Node Tab (not Inspector!)->Area2D->area_entered(area: Area2D) + * Video Contents [[https://www.youtube.com/watch?v=WVQkOWY3zxQ][Lesson Link]] diff --git a/cho1/lesson-13.org b/cho1/lesson-13.org new file mode 100644 index 0000000..b5cbbdb --- /dev/null +++ b/cho1/lesson-13.org @@ -0,0 +1,40 @@ +#+HTML_HEAD: +#+HTML_HEAD: +#+title: Lesson 13: Player Health | part 1 + + +* Links +- [[../../arpg/toc.org][< Back to Main TOC]] +- [[https://www.youtube.com/watch?v=7rmtxjAjUPc][Player Health | part 1]] + + +* Notes + +** intro +- first of two episodes +- add health to player +- create gui + +** player health +- in player script add variable for health + +#+begin_src godot +var currentHealth: int = 3 +#+end_src + +- decrease health every time player enters a hit box + +* Video Contents / Playlist + +#+attr_html: :class content +- [[https://www.youtube.com/watch?v=7rmtxjAjUPc][00:00 intro]] +- [[https://youtu.be/7rmtxjAjUPc?si=TM8aN4tKDDMNQ4R2&t=15][00:15 player health]] +- [[https://youtu.be/7rmtxjAjUPc?si=lijARa4yr18XT_lm&t=79][01:19 max health]] +- [[https://youtu.be/7rmtxjAjUPc?si=T5ytn-bXJSRg7oU_&t=147][02:27 heart container]] +- [[https://youtu.be/7rmtxjAjUPc?si=A3ug1hGXKHi2j9gI&t=183][03:03 heart gui]] +- [[https://youtu.be/7rmtxjAjUPc?si=lCdHAHKPiICvmQbV&t=219][03:39 self modulate]] +- [[https://youtu.be/7rmtxjAjUPc?si=7PzW3aZPQTWJGVh7&t=258][04:18 layout min size]] +- [[https://youtu.be/7rmtxjAjUPc?si=kKyF0tRjTYbO2HAu&t=309][05:09 HBoxContainer]] +- [[https://youtu.be/7rmtxjAjUPc?si=Gs5odvAhZLYi6YX8&t=390][06:30 Add gui to world]] +- [[https://youtu.be/7rmtxjAjUPc?si=2ibqcYJtKh8ZfERE&t=428][07:08 Anchors preset]] +- [[https://youtu.be/7rmtxjAjUPc?si=TtgvyFGvz4s1yljN&t=451][07:31 outro]] diff --git a/toc.org b/toc.org index 5487f5d..a4497fa 100644 --- a/toc.org +++ b/toc.org @@ -13,6 +13,7 @@ *** [[file:./ch01/g10-tilemap terrains-part2.org][Lesson 10: Tilemap Terrains (autotiles), part 2]] *** [[file:ch01/lesson-11.org][Lesson 11: Creating the First Enemy]] *** [[file:ch01/lesson-12.org][Lesson 12: Player-Enemy Collision]] +*** [[file:cho1/lesson-13.org][Lesson 13: Player health | part 1]] * Playlists