Game Development Reference
In-Depth Information
_selectedSkill, itemsContent, itemCount,
GUI.skin.GetStyle("Selected Item"));
GUI.EndScrollView ();
_guiContent = (_selectedSkill > 0) ?
itemsContent[_selectedSkill] : new GUIContent("");
}
4. Next, we will go back to our Menu script and add the new variables for the
EQUIPMENT window, so add the highlighted code as follows:
// Unity JavaScript user:
private var _scrollPosition : Vector2 = Vector2.zero;
private final var EQUIP_BOX_RECT : Rect = new Rect
(237, 67, 360, 207);
private final var EQUIP_WEAPON_RECT : Rect = new Rect
(237, 280, 360, 157);
private final var EQUIP_STAT_RECT : Rect = new Rect
(252, 81, 331, 142);
private final var EQUIP_SKILL_RECT : Rect = new Rect
(460, 121, 127, 125);
private final var EQUIP_RECTS : Rect[] = [new Rect
(252, 101, 180, 40), new Rect (252, 161, 180, 40),
new Rect (252, 221, 180, 40), new Rect (464, 125,
119, 117) ];
private final var EQUIP_WINDOW_RECT : Rect = new Rect
(500, 0, 70, 100);
private var _equipBooleans : boolean[] = new
boolean[4];
// C# user:
Vector2 _scrollPosition = Vector2.zero;
readonly Rect EQUIP_BOX_RECT = new Rect (237, 67,
360, 207);
Search WWH ::




Custom Search