Seguei ai o também script do menu "Minerocraft" pessoal é só copiar e colar no seu Monodevelop!! =]
//MENU MINEROCRAFT
#pragma strict
var TamanhoPTelaH : float;
var TamanhoPTelaV : float;
var DeltaV : float;
var DeltaH : float;
var DeltaVCraft : float;
var DeltaHCraft : float;
var ExibeMenu : boolean;
function Start () {
ExibeMenu=false;
}
function Update () {
if (Input.GetKeyDown(KeyCode.Escape))
{
ExibeMenu = !ExibeMenu;
}
}
function OnGUI() {
var i : int;
var j : int;
TamanhoPTelaH = Screen.width/15;
TamanhoPTelaV = Screen.height/15;
DeltaV = Screen.height - TamanhoPTelaV;
DeltaH = Screen.width/2 - (TamanhoPTelaH*5);
DeltaVCraft = Screen.height/50;
DeltaHCraft = Screen.width/2;
for (i=0;i<10;i++)
{
if (GUI.Button(Rect(DeltaH+TamanhoPTelaH*i,DeltaV,TamanhoPTelaH,TamanhoPTelaV)," "))
{
print(i);
}
}
if (ExibeMenu)
{
for (i=1;i<4;i++)
{
for (j=0;j<10;j++)
{
if (GUI.Button(Rect(DeltaH+TamanhoPTelaH*j,DeltaV-TamanhoPTelaV*i,TamanhoPTelaH,TamanhoPTelaV)," "))
{
print(i+"<=>"+j);
}
}
}
for (i=0;i<3;i++)
{
for (j=4;j<7;j++)
{
if (GUI.Button(Rect(DeltaHCraft+TamanhoPTelaH*j,DeltaVCraft+TamanhoPTelaV*i,TamanhoPTelaH,TamanhoPTelaV)," "))
{
print(i+"<=>"+(j-4));
}
}
}
}
}
var TamanhoPTelaH : float;
var TamanhoPTelaV : float;
var DeltaV : float;
var DeltaH : float;
var DeltaVCraft : float;
var DeltaHCraft : float;
var ExibeMenu : boolean;
function Start () {
ExibeMenu=false;
}
function Update () {
if (Input.GetKeyDown(KeyCode.Escape))
{
ExibeMenu = !ExibeMenu;
}
}
function OnGUI() {
var i : int;
var j : int;
TamanhoPTelaH = Screen.width/15;
TamanhoPTelaV = Screen.height/15;
DeltaV = Screen.height - TamanhoPTelaV;
DeltaH = Screen.width/2 - (TamanhoPTelaH*5);
DeltaVCraft = Screen.height/50;
DeltaHCraft = Screen.width/2;
for (i=0;i<10;i++)
{
if (GUI.Button(Rect(DeltaH+TamanhoPTelaH*i,DeltaV,TamanhoPTelaH,TamanhoPTelaV)," "))
{
print(i);
}
}
if (ExibeMenu)
{
for (i=1;i<4;i++)
{
for (j=0;j<10;j++)
{
if (GUI.Button(Rect(DeltaH+TamanhoPTelaH*j,DeltaV-TamanhoPTelaV*i,TamanhoPTelaH,TamanhoPTelaV)," "))
{
print(i+"<=>"+j);
}
}
}
for (i=0;i<3;i++)
{
for (j=4;j<7;j++)
{
if (GUI.Button(Rect(DeltaHCraft+TamanhoPTelaH*j,DeltaVCraft+TamanhoPTelaV*i,TamanhoPTelaH,TamanhoPTelaV)," "))
{
print(i+"<=>"+(j-4));
}
}
}
}
}
Seguei ai o vídeo referente ao script:
VALEU!
ResponderExcluirda pre fazer com c# charp
ResponderExcluir