Game Development Reference
In-Depth Information
public GUIContent guiContent {
get { return _guiContent; }
}
public void Init ( Texture skillBoxTexture ) {
_guiContent = new GUIContent("");
_skillBoxTexture = skillBoxTexture;
}
}
8. Then, we will add variables and initialize it to our menu script; open the menu
script and type the following highlighted code:
// Unity JavaScript user:
private final var SKILL_BOX_RECT : Rect = new Rect
(460, 284, 127, 125);
var weapons : ItemsContainer;
var armors : ItemsContainer;
var accessories : ItemsContainer;
var items : ItemsContainer;
var skills : SkillsContainer;
function Start () : void {
_isMenuOpen = false;
weapons.Init(true);
armors.Init(true);
accessories.Init(true);
items.Init(false);
skills.Init(skillBoxTexture);
}
// C# user:
readonly Rect SKILL_BOX_RECT = new Rect (460, 284,
127, 125);
public ItemsContainer weapons;
Search WWH ::




Custom Search