Sprites can be modified in the editor, as well as through code. In this tutorial, see how modification through code takes place.
- [Instructor] Now let's look at modifying sprite…using code.…Here I am in my game scene,…and I've gutted all of the template-specific objects.…I've also gutted all this template-specific code…in GameScene.swift, and I've removed the actions file…because it doesn't apply to what we're doing.…You can leave it in though if you want…because it won't make a difference.…Here in GameScene.sks, I'm going to drag in a color sprite…and change its texture to spaceship.…Now you may be wondering where spaceship comes from.…
It's actually part of a template and can be found…in the assets folder.…There's our spaceship right there.…Back to our sprite get scene file,…I'm going to move this to the center of the screen.…It doesn't have to be perfect.…That should be good enough,…and what I want to do is scale this down using code.…Now in order to reference a sprite with our code,…we actually have to first give it a name,…so I'm going to select the sprite here.…You can tell it's selected…because it has the big bounding box around it,…
- 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
Game Design Careers with Brenda Romerowith Brenda Romero54m 41s Beginner
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.