diff --git a/ch01/lesson-12.org b/ch01/lesson-12.org new file mode 100644 index 0000000..6617ff8 --- /dev/null +++ b/ch01/lesson-12.org @@ -0,0 +1,40 @@ +#+HTML_HEAD: +#+HTML_HEAD: +#+title: Lesson 12: Player-Enemy Collisions + + +[[../../arpg/toc.org][< Back to Main TOC]] + + +* Notes +** add collision shape to enemy sprite +- add CollisionShape2D to sprite root + +*** add shape +- select collision shape 2D node from Scene Panel +- Go to Inspector->CollisionShape2D->Shape +- select 'CapsuleShape2D' from dropdown + +*** modify shape +- Go to Inspector->CollisionShape2D->Node2D +- Open 'Transform' +- Go to Rotation and set to 90 degrees +- Modify shape via handles to adjust it over sprite + +*** z-index +- set :w + + +* Video Contents + +[[https://www.youtube.com/watch?v=WVQkOWY3zxQ][Lesson Link]] + +#+attr_html: :class content +- [[https://www.youtube.com/watch?v=WVQkOWY3zxQ][00:00 Introduction]] +- [[https://youtu.be/WVQkOWY3zxQ?si=vhyjv3xTfYhvAMmE&t=28][00:28 body-body collision]] +- [[https://youtu.be/WVQkOWY3zxQ?si=qLZquUVuAC-yYN1t&t=238][03:57 layer and mask]] +- [[https://youtu.be/WVQkOWY3zxQ?si=GqVUob9wQvm1YH_9&t=298][04:58 hurt boxy and hit box]] +- [[https://youtu.be/WVQkOWY3zxQ?si=rhqR5crCcWh7vgSH&t=394][06:34 hit box animation]] +- [[https://youtu.be/WVQkOWY3zxQ?si=DIBeG4TRZdhcds0g&t=711][11:51 fixing move animation]] +- [[https://youtu.be/WVQkOWY3zxQ?si=CTRznDX_bRokCO0d&t=751][12:31 hurt-hit box collisions]] +- [[https://youtu.be/WVQkOWY3zxQ?si=fUUy5KhrAFLzbWdA&t=827][13:47 outro]]