Join Kelley Hecker for an in-depth discussion in this video Clear rows and columns, part of Building a Match 3 Game with Unity.
- [Voiceover] Let's change what our special pieces do…when we clear them.…Instead of doing nothing, like a normal piece,…they'll clear all the pieces in either the same row…or same column, depending on what type…of special piece it is.…Create a new script called ClearLinePiece.…Go ahead and open up.…This class is going to extend from ClearablePiece.…This will allow us to store a ClearLinePiece component…as a clearable component on our game piece.…It also lets us inherit all the functions…from ClearablePiece.…
We're just going to slightly modify the Clear function…to also clear the row or column.…First we need to know if this piece is one…that clears a row or a column.…Add a public Boolean, called isRow.…If we're a row-clearing piece, this will be true.…And if we're a column-clearing piece, it will be false.…In the editor, select the Row Clear Piece prefab.…We're going to replace the regular…clearable piece component with…the new ClearLinePiece component.…Remove the clearable piece component.…
Then click on Add Component, and Add Clear Line Piece.…
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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.