In this tutorial, you'll see how parents and children work in SpriteKit and how objects can be given children and assigned to new parents.
- [Instructor] Now we've talked briefly about parents before…in that we've said that parents must exist…for a child object to be drawn onto the screen.…In other words, this color sprite…that I drag out from the object library…is not going to be drawn on the screen…until it has a parent.…For example, this object's parent is the main scene.…So we need to have this hierarchy or parents and children.…
So a child is an object that resides within another node.…That other node would be called a parent node.…So let's look at how we can control parenting…with these other nodes that we drag out.…So I have this SK sprite node selected here…and what I'm going to do is apply the ship texture to it.…So I'll click the drop-down menu…and I'm going to apply player_frame1.…So let's say we're making a game…and we have this player character that's a spaceship…and at some point the player gets a power-up…where he has two drone ships…flying along and shooting with him.…
So those ships are always going to be…moving along as the player moves.…
- Creating a SpriteKit project
- Adding and modifying sprites
- Creating sprites in code
- Transitioning between scenes
- Working with children and parents
- Adding physics
- Detecting and responding to collisions
- Applying particle effects
- Creating actions
- Working with sound
- Adding cameras and lights
Skill Level Intermediate
Careers in the Game Industrywith Christian Bradley1h 19m Beginner
Building a Game App with the Android SDKwith David Gassner2h 6m Intermediate
1. Introduction to SpriteKit
2. Add Physics
3. Work with Particle Effects
4. Work with Actions
5. Work with Audio
6. Additional Features
Next steps1m 41s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.