Game Development Reference
In-Depth Information
Note
Note that I find it useful when I have dynamic items that can display different items to
temporarily assign a sample sprite to the object while placing it and then remove the sprite
later.
Lastly, for the layout, we need to add 2D colliders to all the objects that we intend the user
to be able to click on; so, add an appropriate 2D collider to the following objects:
Slot : For this object, add a Box Collider 2D component, scaling the collider's
size to fit the graphics on the screen. For example, for a 32 x 32 image, scale the
collider by 0.32 for both the X and Y position.
Buy : For this object, add a Box Collider 2D component. It should scale automat-
ically, but it's good practice to check.
Back : For this object, add a circle collider 2D component.
With the layout in place, we need something for the screen to use. So, let's add some
items.
Search WWH ::




Custom Search