1.1 KiB
Executable file
1.1 KiB
Executable file
Section 03 - Lesson 04 | Gem Scene
Notes
quick recap
create a Gem Scene
-
Create a new Scene
- instead of hitting 2D, hit "+" and choose Area2D
-
Create a Sprite2D child
- get element_red_diamond.png
- Sprite2D->Inspector->Sprite2D->Texture
-
Create a CollisionShape2D child under Sprite2D
- Inspector->CollisionShape2D->shape , choose RectangleShape2D
-
Rotate the CollisionShape2D 45 degrees
- Inspector->Node2D->Transform->Rotation
- set rotation to 45
-
Increase the size of the collision shape
- Inspector->CollisionShape2D->Shape click INSIDE the dropdown area
- it will show size, set the size to 35, 35
add the Gem Scene to the Game
- Go to the Game scene
- Hit the "Instatiate Child Scene" button or press Shift+Command+A
- Add the Gem Scene as a node
- Move the object somewhere else on the screen