This commit is contained in:
ronny abraham 2024-11-27 05:20:17 +02:00
parent 1e7bba86a0
commit 469111223d
3 changed files with 46 additions and 1 deletions

View file

@ -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]]

40
cho1/lesson-13.org Normal file
View file

@ -0,0 +1,40 @@
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../../../../_share/media/css/org-mode.css" />
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../../_share/media/css/godot.css" />
#+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]]

View file

@ -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