diff --git a/_share/media/img/section04/lesson04/EX04a.png b/_share/media/img/section04/lesson04/EX04a.png new file mode 100644 index 0000000..92204b0 Binary files /dev/null and b/_share/media/img/section04/lesson04/EX04a.png differ diff --git a/_share/media/img/section04/lesson04/EX04b.png b/_share/media/img/section04/lesson04/EX04b.png new file mode 100644 index 0000000..62b1804 Binary files /dev/null and b/_share/media/img/section04/lesson04/EX04b.png differ diff --git a/_share/media/img/section04/lesson04/EX04c.png b/_share/media/img/section04/lesson04/EX04c.png new file mode 100644 index 0000000..6011531 Binary files /dev/null and b/_share/media/img/section04/lesson04/EX04c.png differ diff --git a/_share/media/img/section04/lesson04/EX05.png b/_share/media/img/section04/lesson04/EX05.png new file mode 100644 index 0000000..e1ba66a Binary files /dev/null and b/_share/media/img/section04/lesson04/EX05.png differ diff --git a/_share/media/img/section04/lesson04/EX06a.png b/_share/media/img/section04/lesson04/EX06a.png new file mode 100644 index 0000000..0e55a71 Binary files /dev/null and b/_share/media/img/section04/lesson04/EX06a.png differ diff --git a/_subsections/sec04/lesson-04.org b/_subsections/sec04/lesson-04.org index 591eec8..6cd1829 100644 --- a/_subsections/sec04/lesson-04.org +++ b/_subsections/sec04/lesson-04.org @@ -53,3 +53,47 @@ #+attr_html: :width 600px file:../../_share/media/img/section04/lesson04/EX03.png + +**** frame duration +- the frame duration textbox allows you to set the duration of a specific frame +- this is apparently done by time + +*** adding frames +- click on the add frames button + #+attr_html: :width 600px + file:../../_share/media/img/section04/lesson04/EX04a.png + +- add a sprite sheet +- resize the sprite grid so godot can know what the sprites are + #+attr_html: :width 600px + file:../../_share/media/img/section04/lesson04/EX04b.png + +- when you are satisfied with the frames available, select all and add the frames + #+attr_html: :width 600px + file:../../_share/media/img/section04/lesson04/EX04c.png + +** resources +- currently the sprite we created is embedded as an internal resource to our plane scene +- if you save it, then the information regarding the frames will be moved to that tres file you saved + - allows you to reuse the frame resource + +*** saving the sprite frame as a resource +- click on Inspector->AnimatedSprite2D->Animation->Sprite Frame drop down arrow +- in the pop up menu click on 'save as' + + #+attr_html: :width 300px + file:../../_share/media/img/section04/lesson04/EX05.png + +** NOTE: if the plane is too large (or small) +- go to the plane scene +- select the AnimatedSprite2D from the scene menu +- go to Inspector->Node2D->Transform->Scale +- change values as appropriate + +** add the plane scene + 1. go to the game scene + 2. click on the 'instantiate child node' + #+attr_html: :width 300px + file:../../_share/media/img/section04/lesson04/EX06a.png + + 3. from dialog popup, select the plane.tscn scene