Join Kelley Hecker for an in-depth discussion in this video Color-clearing piece prefab, part of Building a Match 3 Game with Unity.
- [Voiceover] We're going to create a new special piece…that clears all the pieces on the board of a certain color.…First, we'll make the prefab.…Drag the NormalPiecePrefab into the hierarchy…and select Break Prefab Instance from the GameObject menu.…Rename this to RainbowPiecePrefab.…Instead of having six possible colors like our normal piece,…this piece will only have one color.…So change the size of the Color Sprites array to one.…The one color will be any,…which can be matched with any piece.…
You can find the texture for the Rainbow Piece…in the Exercise files, under Textures, Sprites.…Drag the file called Rainbow_Fish…into the Sprite variable in the inspector.…We'll also update the sprite on the piece object.…Next, we'll create a new script…that will clear all the pieces of a certain color.…This is similar to what we did…with the Clear Line Piece script.…Create a new script and call it Clear Color Piece.…
Click on the Rainbow Piece object…and remove the Clearable Piece component.…Click Add Component and add the…
Game developer Kelley Hecker covers topics like creating a grid-based game board, using inheritance to create different types of game pieces, adding obstacles and new levels, detecting matches and clearing pieces, and implementing a user interface complete with a score screen. By the end of the course, members will have a completed game and learned new techniques to apply to their next Unity project.
- Creating a game board grid
- Creating and scripting game pieces
- Filling the board
- Creating obstacles
- Swapping pieces
- Matching pieces
- Clearing obstacles and pieces
- Creating new levels
- Creating the user interface: HUD, game over screen, etc.
Skill Level Intermediate
Creating Mobile Games with Unitywith Kelley Hecker1h 12m Intermediate
Build a Real-Time Strategy Game with Unity 5with Dan Violet Sagmiller3h 47m Intermediate
1. The Game Board
2. Make a Move
3. Special Piece Types
4. Level Types
5. User Interface
Next steps1m 29s
- 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.