Game Development Reference
In-Depth Information
// C# user:
void DoMyWindow (int windowID ) {
switch (_currentTool) {
case TAB.INVENTORY : //Items
break;
case TAB.EQUIPMENT : //Equip
EquipWindow();
break;
}
}
7. Now, we need to create three prefabs for weapons, armors, and accessories; so, go
back to Unity and create the first GameObject (weapon) by going to GameOb-
ject | Create Empty to create the empty game object and name it Dark Fist ,
and add the item script to this object by going to its Inspector view, and then
click on Add Component and choose Scripts | Item .
8. Next, we right-click on this object and choose Duplicate twice to create two other
objects and name those two objects as Dark Armor and Dark Mask .
9. Now, we need to put the information in each item that we just created; go to the
Inspector view of each item and set them as follows:
◦ For Dark Fist , add the following information:
Item (script)
Icon
weapon (drag the weapon texture here)
Info This is the dark weapon.
◦ For Dark Armor , add the following information:
Item (script)
Search WWH ::




Custom Search