Game Development Reference
In-Depth Information
Engage thrusters
We will start this section by going to the SkillsContainer script and adding new vari-
ables. This is done by performing the following steps:
1. Open the SkillsContainer script and add the following highlighted code:
// Unity JavaScript user:
private var _skillBoxTexture : Texture;
private final var SKILL_BOX_POS : Rect = new Rect
(253, 286, 330, 140);
private final var SKILL_BOX_RECT : Rect = new Rect (0,
0, 125, 117);
var textures : Texture[];
private var _textureCount : int;
private var _selectedSkill : int;
private var _scrollPosition : Vector2;
function get guiContent () : GUIContent {
// C# user:
Texture _skillBoxTexture;
readonly Rect SKILL_BOX_POS = new Rect (253, 286, 330,
140);
readonly Rect SKILL_BOX_RECT = new Rect (0, 0, 125,
117);
public Texture[] textures;
int _textureCount;
int _selectedSkill;
Vector2 _scrollPosition;
public GUIContent guiContent {
Search WWH ::




Custom Search