Game Development Reference
In-Depth Information
"Disabled Click");
switch (i) {
case 0: weapons.SetupScrollBar(); break;
case 1: armors.SetupScrollBar(); break;
case 2: accessories.SetupScrollBar(); break;
case 3: skills.SetupSkillScrollBar(); break;
}
} else {
if (GUI.Button(EQUIP_RECTS[i],
equipContent[i], "Selected Item")) {
_equipBooleans[i] = true;
for (int j = 0; j < _equipBooleans.Length;
j++) {
if (i != j) { _equipBooleans[j] = false; }
}
}
}
}
}
6. Then, we go back to the DoMyWindow() function and add the following high-
lighted code in the switch-case statement to inform the EQUIPMENT win-
dow when the user clicks on the EQUIPMENT tab:
// Unity JavaScript user:
private function DoMyWindow (windowID : int) : void {
switch (_currentTool) {
case TAB.INVENTORY : //Items
break;
case TAB.EQUIPMENT : //Equip
EquipWindow();
break;
}
}
Search WWH ::




Custom Search