Game Development Reference
In-Depth Information
Click on
Add New Reference
and select the
TileComponent
you just created from
the provided list. Once this is done, close the project properties window and look at
the newly created
TileComponent
project.
We'll begin by renaming the generated
Class1.cs
file to
TileManager.cs
, ac-
cepting the offer to automatically rename the class itself. Once that is done, open up
the file and you'll see a sealed class named
TileManager
. If you don't, make the
appropriate edits.
We're going to add one method here to select the type of tile we want and set the
data. Add in a new static method named
UpdateScoreTile
, which takes an in-
teger parameter that we will name
score
.