本文整理汇总了C#中GUIManager.connect方法的典型用法代码示例。如果您正苦于以下问题:C# GUIManager.connect方法的具体用法?C# GUIManager.connect怎么用?C# GUIManager.connect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GUIManager
的用法示例。
在下文中一共展示了GUIManager.connect方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
//.........这里部分代码省略.........
"toggle",
toggleOperation[1]);
gui.CreateGUIObject(MULTIPLY,
"X",
new Rect((Screen.width/100)*20, (Screen.height/100)*65, 100, 30),
GUIType.Toggle,
"toggle",
toggleOperation[2]);
gui.CreateGUIObject(DIVIDE,
"%",
new Rect((Screen.width/100)*60, (Screen.height/100)*65, 100, 30),
GUIType.Toggle,
"toggle",
toggleOperation[3]);
//Equation Format
gui.CreateGUIObject(FORMAT,
"Format: ",
new Rect((Screen.width/100)*20, (Screen.height/100)*70,(Screen.width/100)*50, (Screen.height/100)*5),
GUIType.Label,
"button");
gui.CreateGUIObject(MINUS2,
"-",
new Rect((Screen.width/100)*40, (Screen.height/100)*70,(Screen.width/100)*5, (Screen.height/100)*5),
GUIType.Button,
"button");
gui.CreateGUIObject(EQUATION_FORMAT,
formatArray[_format_num],
new Rect((Screen.width/100)*45, (Screen.height/100)*71,(Screen.width/100)*50, (Screen.height/100)*5),
GUIType.Label,
"nobox");
gui.CreateGUIObject(PLUS2,
"+",
new Rect((Screen.width/100)*60, (Screen.height/100)*70,(Screen.width/100)*5, (Screen.height/100)*5),
GUIType.Button,
"button");
//win set
gui.CreateGUIObject(NUMBER_TO_WIN,
"Number to win? ",
new Rect((Screen.width/100)*20, (Screen.height/100)*75,(Screen.width/100)*50, (Screen.height/100)*5),
GUIType.Label,
"button");
gui.CreateGUIObject(MINUS3,
"-",
new Rect((Screen.width/100)*50, (Screen.height/100)*75,(Screen.width/100)*5, (Screen.height/100)*5),
GUIType.Button,
"button");
gui.CreateGUIObject(PLUS3,
"+",
new Rect((Screen.width/100)*60, (Screen.height/100)*75,(Screen.width/100)*5, (Screen.height/100)*5),
GUIType.Button,
"button");
gui.CreateGUIObject(NUMBER_TO_WIN_VALUE,
_num_to_win.ToString(),
new Rect((Screen.width/100)*55, (Screen.height/100)*76,(Screen.width/100)*50, (Screen.height/100)*5),
GUIType.Label,
"nobox");
//Alien Speed
gui.CreateGUIObject(ALIEN_SPEED,
"Alien Speed: " + (Mathf.Round(_alien_speed *100f)/100f),
new Rect((Screen.width/100)*20, (Screen.height/100)*80,(Screen.width/100)*50, (Screen.height/100)*5),
GUIType.Label,
"button");
gui.CreateGUIObject(ALIEN_SLIDER_SPEED,
"ALIEN_SLIDER_SPEED",
new Rect ((Screen.width/100)*50, (Screen.height/100)*80, (Screen.width/100)*20, (Screen.height/100)*2),
GUIType.Slider,
"",
false,
0.25f,
1.0f,
_alien_speed);
gui.connect(TERRAIN0,TERRAIN1,TERRAIN1,CUSTOM_GAME,TERRAIN2);
gui.connect(TERRAIN1,TERRAIN0,TERRAIN0,CUSTOM_GAME,TERRAIN3);
gui.connect(TERRAIN2,TERRAIN3,TERRAIN3,TERRAIN0,TERRAIN4);
gui.connect(TERRAIN3,TERRAIN2,TERRAIN2,TERRAIN1,TERRAIN5);
gui.connect(TERRAIN4,TERRAIN5,TERRAIN5,TERRAIN2,TERRAIN6);
gui.connect(TERRAIN5,TERRAIN4,TERRAIN4,TERRAIN3,TERRAIN7);
gui.connect(TERRAIN6,TERRAIN7,TERRAIN7,TERRAIN4,PLUS);
gui.connect(TERRAIN7,TERRAIN6,TERRAIN6,TERRAIN5,MINUS);
gui.connect(PLUS,MINUS,MINUS,TERRAIN6,MULTIPLY);
gui.connect(MINUS,PLUS,PLUS,TERRAIN7,DIVIDE);
gui.connect(MULTIPLY,DIVIDE,DIVIDE,MINUS,FORMAT);
gui.connect(DIVIDE,MULTIPLY,MULTIPLY,MINUS,FORMAT);
gui.connect(FORMAT,MINUS2,PLUS2,MULTIPLY,NUMBER_TO_WIN);
gui.connect(NUMBER_TO_WIN,MINUS3,PLUS3,FORMAT,ALIEN_SPEED);
gui.connect(ALIEN_SPEED,"","",NUMBER_TO_WIN,CUSTOM_GAME);
gui.connect(CUSTOM_GAME,RESET,SAVE,ALIEN_SPEED,TERRAIN0);
gui.connect(SAVE,CUSTOM_GAME,RESET,ALIEN_SPEED,TERRAIN0);
gui.connect(RESET,SAVE,CUSTOM_GAME,ALIEN_SPEED,TERRAIN0);
gui.connect(MINUS1,"",NUMBER_OF_TERRAINS,"","");
gui.connect(PLUS1,NUMBER_OF_TERRAINS,"","","");
gui.connect(MINUS2,"",FORMAT,"","");
gui.connect(PLUS2,FORMAT,"","","");
gui.connect(MINUS3,"",NUMBER_TO_WIN,"","");
gui.connect(PLUS3,NUMBER_TO_WIN,"","","");
gui.pointer = TERRAIN0;
}
示例2: Start
void Start()
{
SoundManager.SOUNDS.playSound(SoundManager.UI_CLICK,MasterController.UI_MAIN_MENU);
pc = MasterController.BRAIN.pci();
gui = new GUIManager(thisMetalGUISkin);
gui.OnClick += HandleGuiOnClick;
pc.onGesturePerformed += HandlePconGesturePerformed;
gui.CreateGUIObject(TITLE,
"Mathius: Defender of Earth!",
new Rect((Screen.width/5)/2,(3*(Screen.height/100)),(4*(Screen.width/5)),(18*(Screen.height/100))),
GUIType.Label,
"label");
gui.CreateGUIObject(START_GAME,
"START GAME",
new Rect(Screen.width/3 ,(23*(Screen.height/100)) ,(2*(Screen.width/5)) ,(10*(Screen.height/100))),
GUIType.Button,
"box");
gui.CreateGUIObject(LEVEL_EDITOR,
"SETTINGS",
new Rect((Screen.width/3),(35*(Screen.height/100)),(2*(Screen.width/5)),(10*(Screen.height/100))),
GUIType.Button,
"box");
gui.CreateGUIObject(OPTIONS,
"OPTIONS",
new Rect((Screen.width/3),(46*(Screen.height/100)),(2*(Screen.width/5)),(10*(Screen.height/100))),
GUIType.Button,
"box");
gui.CreateGUIObject(HIGH_SCORE,
"HIGH SCORE",
new Rect(Screen.width/3,(57*(Screen.height/100)), (2*(Screen.width/5)), (10*(Screen.height/100))),
GUIType.Button,
"box");
gui.CreateGUIObject(CREDITS,
"CREDITS",
new Rect(Screen.width/3,(68*(Screen.height/100)),(2*(Screen.width/5)),(10*(Screen.height/100))),
GUIType.Button,
"box");
gui.CreateGUIObject(EXIT,
"EXIT",
new Rect(Screen.width/3,(79*(Screen.height/100)), (2*(Screen.width/5)), (10*(Screen.height/100))),
GUIType.Button,
"box");
gui.connect(START_GAME,null,null,EXIT,LEVEL_EDITOR);
gui.connect(LEVEL_EDITOR,null,null,START_GAME,OPTIONS);
gui.connect(OPTIONS,null,null,LEVEL_EDITOR,HIGH_SCORE);
gui.connect(HIGH_SCORE,null,null,OPTIONS,CREDITS);
gui.connect(CREDITS,null,null,HIGH_SCORE,EXIT);
gui.connect(EXIT,null,null,CREDITS,START_GAME);
gui.pointer = START_GAME;
}
示例3: Start
void Start()
{
SoundManager.SOUNDS.playSound(SoundManager.UI_CLICK,MasterController.UI_CAMERA_ALT);
gui = new GUIManager(thisMetalGUISkin);
gui.OnClick += HandleGuiOnClick;
gui.CreateGUIObject(NEXT,
"Next",
new Rect(8*(Screen.width/10) ,(95*(Screen.height/100)) ,(2*(Screen.width/10)) ,(10*(Screen.height/100))),
GUIType.Button,
"box");
pc = MasterController.BRAIN.pci();
pc.onGesturePerformed += HandlePconGesturePerformed;
stats = MasterController.BRAIN.sm();
gs = 0;
MUI = gameObject.GetComponent<Mathius_UI>();
creditTimer = 20.0f;
gui.connect(NEXT,NEXT,NEXT,NEXT,NEXT);
gui.pointer = NEXT;
}
示例4: Start
//.........这里部分代码省略.........
guiInput.CreateGUIObject(UP2,
" /\\",
new Rect((Screen.width/100)*50, (Screen.height/100)*45,(Screen.width/100)*2, (Screen.height/100)*5),
GUIType.Button,
"button",
false,
0.0f,
0.0f,
0.0f,
false);
guiInput.CreateGUIObject(DOWN2,
" \\/",
new Rect((Screen.width/100)*50, (Screen.height/100)*55,(Screen.width/100)*2, (Screen.height/100)*5),
GUIType.Button,
"button",
false,
0.0f,
0.0f,
0.0f,
false);
//---end center
//far right
guiInput.CreateGUIObject(UP3,//right up button
" /\\",
new Rect((Screen.width/100)*54, (Screen.height/100)*45,(Screen.width/100)*2, (Screen.height/100)*5),
GUIType.Button,
"button",
false,
0.0f,
0.0f,
0.0f,
false);
guiInput.CreateGUIObject(DOWN3, //right down button
" \\/",
new Rect((Screen.width/100)*54, (Screen.height/100)*55,(Screen.width/100)*2, (Screen.height/100)*5),
GUIType.Button,
"button",
false,
0.0f,
0.0f,
0.0f,
false);
//---end far right
guiInput.CreateGUIObject(ENTER,
"ENTER",
new Rect((Screen.width/20) ,(90*(Screen.height/100)) ,(4*(Screen.width/10)) ,(15*(Screen.height/100))),
GUIType.Button,
"box");
guiInput.CreateGUIObject(LEFT,
"<",
new Rect((Screen.width/100)*42, (Screen.height/100)*50,(Screen.width/100)*2, (Screen.height/100)*5),
GUIType.Button,
"button");
guiInput.CreateGUIObject(RIGHT,
">",
new Rect((Screen.width/100)*58, (Screen.height/100)*50,(Screen.width/100)*2, (Screen.height/100)*5),
GUIType.Button,
"button");
//Display
guiDisplay.OnClick += HandleGuiDisplayOnClick;
guiDisplay.CreateGUIObject(MAINMENU,
"Main Menu",
new Rect(5*(Screen.width/10) ,(90*(Screen.height/100)) ,(4*(Screen.width/10)) ,(15*(Screen.height/100))),
GUIType.Button,
"box");
guiDisplay.CreateGUIObject(REPLAY,
"Replay",
new Rect((Screen.width/20) ,(90*(Screen.height/100)) ,(4*(Screen.width/10)) ,(15*(Screen.height/100))),
GUIType.Button,
"box");
guiDisplay.CreateGUIObject(GAMEOVER,
"GameOver",
new Rect((Screen.width/5)/2,(3*(Screen.height/100)),(4*(Screen.width/5)),(10*(Screen.height/100))),
GUIType.Label,
"label");
guiDisplay.CreateGUIObject(FINAL_SCORE,
("SCORE: " + _score),
new Rect((Screen.width/5),(47*(Screen.height/100)),(3*(Screen.width/5)),(18*(Screen.height/100))),
GUIType.Label,
"label");
guiInput.connect(UP1,ENTER,UP2,"",DOWN1);
guiInput.connect(UP2,UP1,UP3,"",DOWN2);
guiInput.connect(UP3,UP2,ENTER,"",DOWN3);
guiInput.connect(DOWN1,ENTER,DOWN2,UP1,"");
guiInput.connect(DOWN2,DOWN1,DOWN3,UP2,"");
guiInput.connect(DOWN3,DOWN2,ENTER,UP3,"");
guiInput.connect(ENTER,UP3,UP1,UP1,UP1);
guiInput.pointer = UP1;
guiDisplay.connect(REPLAY,MAINMENU,MAINMENU,"","");
guiDisplay.connect(MAINMENU,REPLAY,REPLAY,"","");
guiDisplay.pointer = REPLAY;
}
示例5: Start
void Start()
{
SoundManager.SOUNDS.playSound(SoundManager.UI_CLICK,MasterController.UI_CAMERA_ALT);
gui = new GUIManager(thisMetalGUISkin);
gui.OnClick += HandleGuiOnClick;
pc = MasterController.BRAIN.pci();
pc.onGesturePerformed += HandlePconGesturePerformed;
gui.CreateGUIObject(HIGH_SCORES,
"High Scores",
new Rect((Screen.width/5)/2,(3*Screen.height/100),(4*(Screen.width/5)),(18*Screen.height/100)),
GUIType.Label,
"label");
gui.CreateGUIObject(PLAYER1,
("1:\t\t\t" + PlayerPrefs.GetInt("Player H0") +" "+ PlayerPrefs.GetString("Player 0","A")),
new Rect((Screen.width/55),(35*Screen.height/100),(50*(Screen.width/100)),(9*Screen.height/100)),
GUIType.Label,
"box");
gui.CreateGUIObject(PLAYER2,
("2:\t\t\t" + PlayerPrefs.GetInt("Player H1",1)+" "+ PlayerPrefs.GetString("Player 1","B")),
new Rect((Screen.width/55),(45*Screen.height/100),(50*(Screen.width/100)),(9*Screen.height/100)),
GUIType.Label,
"box");
gui.CreateGUIObject(PLAYER3,
("3:\t\t\t" + PlayerPrefs.GetInt("Player H2",2) +" "+ PlayerPrefs.GetString("Player 2","C")),
new Rect((Screen.width/55),(55*Screen.height/100),(50*(Screen.width/100)),(9*Screen.height/100)),
GUIType.Label,
"box");
gui.CreateGUIObject(PLAYER4,
("4:\t\t\t" + PlayerPrefs.GetInt("Player H3",3)+" "+ PlayerPrefs.GetString("Player 3","D")),
new Rect((Screen.width/55),(65*Screen.height/100),(50*(Screen.width/100)),(9*Screen.height/100)),
GUIType.Label,
"box");
gui.CreateGUIObject(PLAYER5,
("5:\t\t\t" + PlayerPrefs.GetInt("Player H4",4) +" "+ PlayerPrefs.GetString("Player 4","E")),
new Rect((Screen.width/55),(75*Screen.height/100),(50*(Screen.width/100)),(9*Screen.height/100)),
GUIType.Label,
"box");
gui.CreateGUIObject(PLAYER6,
("6:\t\t\t" + PlayerPrefs.GetInt("Player H5",5)+" "+ PlayerPrefs.GetString("Player 5","F")),
new Rect((Screen.width/10)*5,(35*Screen.height/100),(50*(Screen.width/100)),(9*Screen.height/100)),
GUIType.Label,
"box");
gui.CreateGUIObject(PLAYER7,
("7:\t\t\t" + PlayerPrefs.GetInt("Player H6",6) +" "+ PlayerPrefs.GetString("Player 6","G")),
new Rect((Screen.width/10)*5,(45*Screen.height/100),(50*(Screen.width/100)),(9*Screen.height/100)),
GUIType.Label,
"box");
gui.CreateGUIObject(PLAYER8,
("8:\t\t\t" + PlayerPrefs.GetInt("Player H7",7)+" "+ PlayerPrefs.GetString("Player 7","H")),
new Rect((Screen.width/10)*5,(55*Screen.height/100),(50*(Screen.width/100)),(9*Screen.height/100)),
GUIType.Label,
"box");
gui.CreateGUIObject(PLAYER9,
("9:\t\t\t" + PlayerPrefs.GetInt("Player H8",8) +" "+ PlayerPrefs.GetString("Player 8","I")),
new Rect((Screen.width/10)*5,(65*Screen.height/100),(50*(Screen.width/100)),(9*Screen.height/100)),
GUIType.Label,
"box");
gui.CreateGUIObject(PLAYER10,
("10:\t\t\t" + PlayerPrefs.GetInt("Player H9",9)+" "+ PlayerPrefs.GetString("Player 9","J")),
new Rect((Screen.width/10)*5,(75*Screen.height/100),(50*(Screen.width/100)),(9*Screen.height/100)),
GUIType.Label,
"box");
gui.CreateGUIObject(MAINMENU,
"Main Menu",
new Rect(5*(Screen.width/10) ,(90*Screen.height/100) ,(4*(Screen.width/10)) ,(15*Screen.height/100) ),
GUIType.Button,
"box");
gui.connect(MAINMENU,MAINMENU,MAINMENU,MAINMENU,MAINMENU);
gui.pointer = MAINMENU;
}
示例6: Start
//.........这里部分代码省略.........
gui.CreateGUIObject(PERCEPTUAL,
"Perceptual: ",
new Rect((Screen.width/100)*20, (Screen.height/100)*30,(Screen.width/100)*50, (Screen.height/100)*5),
GUIType.Label,
"button");
gui.CreateGUIObject(PERCEPTUAL_DISPLAY,
"",
new Rect((Screen.width/100)*55, (Screen.height/100)*31, 100, 30),
GUIType.Toggle,
"toggle",
_perceptual);
//Volume
gui.CreateGUIObject(VOICE_VOLUME,
"Voice Volume: ",
new Rect((Screen.width/100)*20, (Screen.height/100)*34,(Screen.width/100)*50, (Screen.height/100)*5),
GUIType.Label,
"button");
gui.CreateGUIObject(MINUS2,
"-",
new Rect((Screen.width/100)*50, (Screen.height/100)*34,(Screen.width/100)*5, (Screen.height/100)*5),
GUIType.Button,
"button");
gui.CreateGUIObject(VOICE_VOLUME_DISPLAY,
soundArray[_sound],
new Rect((Screen.width/100)*55, (Screen.height/100)*35,(Screen.width/100)*50, (Screen.height/100)*5),
GUIType.Label,
"nobox");
gui.CreateGUIObject(PLUS2,
"+",
new Rect((Screen.width/100)*65, (Screen.height/100)*34,(Screen.width/100)*5, (Screen.height/100)*5),
GUIType.Button,
"button");
//Sound
gui.CreateGUIObject(SOUND,
"Sound: ",
new Rect((Screen.width/100)*20, (Screen.height/100)*38,(Screen.width/100)*50, (Screen.height/100)*5),
GUIType.Label,
"button");
gui.CreateGUIObject(MUTE,
"Mute: ",
new Rect((Screen.width/100)*20, (Screen.height/100)*42,(Screen.width/100)*50, (Screen.height/100)*5),
GUIType.Label,
"button");
gui.CreateGUIObject(MUTE_DISPLAY,
"",
new Rect((Screen.width/100)*55, (Screen.height/100)*43, 100, 30),
GUIType.Toggle,
"toggle",
_mute);
//Music
gui.CreateGUIObject(MUSIC,
("Music: " + (Mathf.Round(_music *100f)/100f)),
new Rect((Screen.width/100)*20, (Screen.height/100)*46,(Screen.width/100)*50, (Screen.height/100)*5),
GUIType.Label,
"button");
gui.CreateGUIObject(MUSIC_DISPLAY,
"",
new Rect ((Screen.width/100)*50, (Screen.height/100)*47, (Screen.width/100)*20, (Screen.height/100)*2),
GUIType.Slider,
"",
false,
0.0f,
100.0f,
_music);
//SFX
gui.CreateGUIObject(EFFECTS,
"Effects: " + (Mathf.Round(_sfx*100f)/100f),
new Rect((Screen.width/100)*20, (Screen.height/100)*50,(Screen.width/100)*50, (Screen.height/100)*5),
GUIType.Label,
"button");
gui.CreateGUIObject(EFFECTS_DISPLAY,
"",
new Rect ((Screen.width/100)*50, (Screen.height/100)*51, (Screen.width/100)*20, (Screen.height/100)*2),
GUIType.Slider,
"",
false,
0.0f,
100.0f,
_sfx);
//Main Menu
gui.CreateGUIObject(MAIN_MENU,
"Main Menu",
new Rect(5*(Screen.width/10) ,(90*(Screen.height/100)) ,(4*(Screen.width/10)) ,(15*(Screen.height/100)) ),
GUIType.Button,
"box");
gui.connect(MATHIUS_COLOR,MINUS1,PLUS1,MAIN_MENU,PERCEPTUAL);
gui.connect(PERCEPTUAL,"","",MATHIUS_COLOR,VOICE_VOLUME);
gui.connect(VOICE_VOLUME,MINUS2,PLUS2,PERCEPTUAL,MUTE);
gui.connect(MUTE,"","",VOICE_VOLUME,MUSIC);
gui.connect(MUSIC,"","",MUTE,EFFECTS);
gui.connect(EFFECTS,"","",MUSIC,MAIN_MENU);
gui.connect(MAIN_MENU,"","",EFFECTS,MATHIUS_COLOR);
gui.connect(MINUS1,"",MATHIUS_COLOR,"","");
gui.connect(PLUS1,MATHIUS_COLOR,"","","");
gui.connect(MINUS2,"",VOICE_VOLUME,"","");
gui.connect(PLUS2,VOICE_VOLUME,"","","");
gui.pointer = MATHIUS_COLOR;
}