public void OnChangeControllerOption() { GreenHellGame.Instance.m_Settings.SaveSettings(); GreenHellGame.Instance.m_Settings.ApplySettings(false); MainMenuManager mainMenuManager = MainMenuManager.Get(); if (mainMenuManager != null) { mainMenuManager.SetupController(); } MenuInGameManager menuInGameManager = MenuInGameManager.Get(); if (menuInGameManager != null) { menuInGameManager.SetupController(); } HUDManager hudmanager = HUDManager.Get(); if (hudmanager != null) { hudmanager.SetuController(); } if (MainMenuManager.Get()) { if (GreenHellGame.IsPadControllerActive()) { CursorManager.Get().ShowCursor(false, false); return; } if (GreenHellGame.IsPCControllerActive()) { CursorManager.Get().ShowCursor(true, false); } } }
void OnHover(bool isOver) { if (isOver) { MainMenuManager.get().onHover(this); } }
private void Bounce(string _colName) ////Bounces the ball to the left or right depending on which paddle it has hit { Vector3 _targetPos = new Vector3(Random.Range(0 - bounceTargetRange / 2, bounceTargetRange / 2), 0, 0); Rigidbody rb = GetComponent <Rigidbody>(); rb.velocity = new Vector3(0, 0, 0); Instantiate(bounceEffect, transform.position, Quaternion.identity); transform.LookAt(_targetPos); rb.AddForce(transform.forward * bounceForce); if (_colName == "_StartGamePaddle") { ////Load the game scene MainMenuManager.LoadLevel(1, 0.05f); } else if (_colName == "_QuitGamePaddle") { MainMenuManager.QuitGame("y"); } else { Debug.Log("Paddle that's not a paddle has been hit. What."); } }
public void EnableItemScreenControl(bool enable) { EnableScrolling(enable); GameObject mainMenuManager = GameObject.FindGameObjectWithTag("Main Menu Manager"); MainMenuManager mmm = mainMenuManager.GetComponent <MainMenuManager>(); mmm.EnableBackButton(MainMenuManager.eScreen.ITEM, enable); GameObject itemIcon = GetCurrentItemIcon(); Button b = itemIcon.GetComponent <Button>(); b.enabled = enable; if (enable) { ItemIcon ic = itemIcon.GetComponent <ItemIcon>(); if (GameData.Instance.m_Sets.Contains(ic.m_ItemType)) { itemIcon.transform.GetChild(1).gameObject.SetActive(false); ic.m_bLocked = false; Text label = itemIcon.GetComponentInChildren <Text>(); Color c = label.color; c.a = 1.0f; label.color = c; SetItemIconEnable(itemIcon, true); } } }
private void Awake() { if (m_mainMenuManager == null) { m_mainMenuManager = this; } else if (m_mainMenuManager != this) { Destroy(gameObject); } m_playPanel = transform.Find("Play_Panel").gameObject; m_optionsMainPanel = m_optionsPanel.transform.Find("Main_Options_Panel").gameObject; m_optionsAudioPanel = m_optionsPanel.transform.Find("Audio_Options_Panel").gameObject; m_optionsGeneralPanel = m_optionsPanel.transform.Find("General_Options_Panel").gameObject; m_audioSource = GetComponent <AudioSource>(); m_fadeImage = transform.Find("Fade_Image").GetComponent <Image>(); m_fadeImageColour = m_fadeImage.color; IntitialiseButtons(); m_mainPanel.SetActive(true); m_optionsPanel.SetActive(false); m_quitToDesktopPanel.SetActive(false); m_lActivePanelButtons = m_lMainPanelButtons; m_selectedButton = m_lActivePanelButtons[0]; m_selectedButton.IsMousedOver = true; }
void Awake() { if (instance == null) { instance = this; } }
// Start is called before the first frame update void Start() { manager = GameObject.FindGameObjectWithTag("GameController").GetComponent <MainMenuManager>(); inputField.text = manager.fileManager.data.name; inputField.Select(); warningText.SetActive(false); }
public void Select() { MainMenuManager menu = (MainMenuManager)GameObject.FindObjectOfType(typeof(MainMenuManager)); if (!changeCharacter) { if (menu) { menu.OpenPanelByName("NewCharacter"); } CharacterCreatorCanvas creator = (CharacterCreatorCanvas)GameObject.FindObjectOfType(typeof(CharacterCreatorCanvas)); if (creator) { creator.SelectCreateCharacter(Index); } } else { CharacterCreatorCanvas creator = (CharacterCreatorCanvas)GameObject.FindObjectOfType(typeof(CharacterCreatorCanvas)); if (creator) { creator.ChangeCharacter(Index); } if (menu) { menu.OpenPanelByName("Home"); } } }
public static void setVisibility(MainMenuItem[] items, string itemKey, bool isVisible, string debug = null, float spacing = defaultVerticalSpacing) { //Debug.Log(string.Format("setVisibility({0},{1},{2},{3},{4})", MainMenuItemArray.ToString(items), itemKey, isVisible.ToString(), debug, spacing.ToString())); if (!string.IsNullOrEmpty(debug)) { //Debug.LogError("MainMenuManager::setVisibility(items, "+itemKey+", "+isVisible+", "+debug+", "+spacing); } for (int index = 0; index < items.Length; index++) { items[index].initializeIfNecessary(); if (items[index].itemName == itemKey) { items[index].displayed = isVisible; if (!string.IsNullOrEmpty(debug)) { //Debug.LogError("MainMenuManager::setVisibility "+debug+" found "+itemKey+" and set its visibility to "+isVisible); } break; } else if (!string.IsNullOrEmpty(debug)) { //Debug.LogError("MainMenuManager::setVisibility "+debug+": '"+itemKey+"'≠'"+items[index].itemName+"'"); } } MainMenuManager.redraw(items, debug, spacing); }
public PartialViewResult _GetNavMenu() { MainMenuManager _menuM = new MainMenuManager(); var list = _menuM.GetAllMenuItems(); return(PartialView(list)); }
/// <summary> /// <para>Eng. Pushed Saved Button. </para> /// <para>Kor. 저장된 게임 버튼을 눌렀습니다. </para> /// </summary> public void SavedButtonPushed(GameObject _pushedButton) { switch (_state) { case SaveLoadSlotManagerState.NewGameSave: _pushedSavedButton = _pushedButton; _rewritePanel.SetActive(true); break; case SaveLoadSlotManagerState.OptionSave: _pushedSavedButton = _pushedButton; _rewritePanel.SetActive(true); break; case SaveLoadSlotManagerState.Load: _pushedSavedButton = _pushedButton; VinoveGameSaveData _savedData = _pushedSavedButton.GetComponent <SavedButtonManager>()._savedData; InGameManager.GetInstance().LoadGameByScript(_savedData); DisableSlot(); MainMenuManager.GetInstance().DisableMainMenu(); InGameManager.GetInstance().VinoveInitialize(); InGameManager.GetInstance().GameState = Enum.GameState.InGame; break; } }
// Start is called before the first frame update void Start() { if (instance == null) { instance = FindObjectOfType <MainMenuManager>(); } }
private void Awake() { if (!_instance) { _instance = this; } else { Destroy(gameObject); } if (PersistentManager.Instance) { // Set player chosen settings through PersistentManager if it exists. // Which it ALWAYS should. if (!PersistentManager.Instance.HasSaveFile()) { // No Save file yet so create one now and default everything to true to match visuals in game on first load. PersistentManager.Instance.SetPlaySound(bPlaySound); PersistentManager.Instance.SetVibrate(bPlayVibrate); // Default values stored so create our default save file. PersistentManager.Instance.SaveSettings(); } else { // Set toggle buttons to reflect the stored player preferences. soundToggle.isOn = PersistentManager.Instance.GetPlaySound(); vibrateToggle.isOn = PersistentManager.Instance.GetVibrate(); } } }
void Awake() { if (Instance == null) { Instance = this; } }
void Start() { if (instance == null) { instance = this.GetComponent <MainMenuManager>(); } if (PlayerPrefManager.GetNoAdsPurchased() == true) { purchaseNoAdsButton.SetActive(false); } //has player gotten rid of ads? HideAdButton(); if (PlayerPrefManager.GetSoundFX() == true) { SFX_Images[0].SetActive(false); // SFX off image SFX_Images[1].SetActive(true); // SFX on image } else { SFX_Images[0].SetActive(true); // SFX off image SFX_Images[1].SetActive(false); // SFX on image } }
private void Awake() { if (Instance == null) { Instance = _mainMenuManager; } }
protected override void Update() { base.Update(); Vector3 vector = this.m_CreditsText.rectTransform.anchoredPosition; vector.y += Time.unscaledDeltaTime * this.m_Speed; if (vector.y > 1460f) { vector.y = this.m_StartY; } this.m_CreditsText.rectTransform.anchoredPosition = vector; if (Input.GetKeyDown(KeyCode.Escape) || Input.GetMouseButtonDown(0)) { base.StartCoroutine(this.FadeOut()); if (MainMenuManager.Get()) { MainMenuManager.Get().SetActiveScreen(typeof(MainMenu), true); return; } if (Input.GetKeyDown(KeyCode.Escape)) { GreenHellGame.Instance.ReturnToMainMenu(); } } }
static void Main(string[] args) { Console.Clear(); Console.WriteLine(""); Console.WriteLine(@" WAKA WAKA!! Welcome to Tabloid.ly by Team Fans of Fozzie. Waka waka! -------------------------------------------------------------------- "); // MainMenuManager implements the IUserInterfaceManager interface IUserInterfaceManager ui = new MainMenuManager(); while (ui != null) { // Each call to Execute will return the next IUserInterfaceManager we should execute // When it returns null, we should exit the program; ui = ui.Execute(); } }
public void OnGame() { if (this.m_ActiveMenuOption.m_Button == this.m_Game) { MainMenuManager.Get().SetActiveScreen(typeof(MainMenuOptionsGame), true); } }
public void setPlatform() { if (!isPlatformSet) { switch (Application.platform) { case RuntimePlatform.WindowsPlayer: case RuntimePlatform.OSXPlayer: case RuntimePlatform.WindowsEditor: case RuntimePlatform.OSXEditor: Logger.Log("LearnMoreOptionsMainMenuItemArray::setPlatform Editor/Standalone prepares choices"); //hide "same tab" option MainMenuManager.setVisibility(_items, sameTabKey, false, "setPlatform"); //rename "new tab" into "open in browser" MainMenuManager.replaceTextBy(newTabKey, browserKey, _items, "setPlatform"); break; default: Logger.Log("LearnMoreOptionsMainMenuItemArray::setPlatform default nothing to do"); MainMenuManager.setVisibility(_items, sameTabKey, true, "setPlatform"); //rename "open in browser tab" into "new tab" MainMenuManager.replaceTextBy(browserKey, newTabKey, _items, "setPlatform"); break; } isPlatformSet = true; } }
private void Start() { managerReference = GameObject.FindGameObjectWithTag("DefaultUI").GetComponent <MainMenuManager>(); rTransform = GetComponent <RectTransform>(); rTransform.anchorMin = new Vector2(0, 0.15269f); rTransform.anchorMax = new Vector2(1, 0.7596f); if (icons.Length == 0) { icons = new LevelIcon[5]; for (int i = 0; i < 5; i++) { icons[i] = transform.GetChild(i).GetComponent <LevelIcon>(); } } levelCount = (managerReference.levelCount - (pageId * 5)) - 1; //Setup level icons for (int i = 0; i < 5; i++) { icons[i].levelID = (((pageId) * 5) + i) + 2; //add one for main menu scene icons[i].text.text = icons[i].levelID.ToString(); if (i > levelCount) { icons[i].gameObject.SetActive(false); } } }
void Awake() { if (instance == null) instance = this; else Destroy(gameObject); }
//---------------------------------------------------------------------- public override void Stop() { Game.GraphicsDevice.DeviceReset -= GraphicsDevice_DeviceReset; MainMenuManager = null; base.Stop(); }
public static MainMenuManager get () { if (_instance == null) { Logger.Log("MainMenuManager::get was badly initialized", Logger.Level.WARN); _instance = GameObject.Find (gameObjectName).GetComponent<MainMenuManager> (); } return _instance; }
public void OnBack() { if (this.m_Loading) { return; } MainMenuManager.Get().SetActiveScreen(typeof(MainMenuDifficultyLevel), true); }
private void Start() { if (instance != null) { Destroy(gameObject); } instance = this; }
// void Awake() { // if (gameManager == null) { // gameManager = GameObject.Find(gameManagerName); // } // if (gameManager != null) // playerManager = gameManager.GetComponent<ActivePlayerManager>(); // else // Debug.Log("The game manager variable was not assigned in the inspector. This will most likely cause errors!"); // } private void Awake() { //find the script -Kyle // if (!usingNewPlayerJoinSystem) selectionOP = playersObject.GetComponent <characterSelection>(); currentMenu = mMManager.GetComponent <MainMenuManager>(); }
public MainMenuInitializeState( FiniteStateMachine stateManager, MainMenuManager mainMenuManager ) { this.stateManager = stateManager; this.mainMenuManager = mainMenuManager; }
// Use this for initialization private void Awake() { if (_MainMenuManager == null) { _MainMenuManager = this; } Time.timeScale = 1; }
// Use this for initialization void Start() { GM = GameObject.Find("GameManager").GetComponent <GameManager>(); MM = GameObject.Find("MainMenuManager").GetComponent <MainMenuManager>(); animator = GetComponent <Animator>(); canPush = true; canPlay = true; }
public SettingsScreen(Game game, ScreenElement previousScreenElement) : base(previousScreenElement, game.GraphicsDevice) { LoadUIStyle(game.Content); MainMenuManager = new MainMenuManager(game, UIstyle, game.Content); game.IsMouseVisible = true; }
private void Start() { if (isLocalPlayer) { MainMenu = FindObjectOfType <MainMenuManager>(); UpdateLobbyPlayerList(); } }
//public ResolutionValueScript resValScript; //public SliderResolutionScript slidResScript; void Start() { gm = GameObject.FindObjectOfType<GameManager> (); mainMenuManagerScript = mainMenuManager.GetComponent<MainMenuManager>(); //slidResScript.numberOfPositions = resValScript.heightResolution.Length; if (gm != null) { soundScript.setVolume (gm.soundVolume); musicScript.setVolume (gm.musicVolume); } }
void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); } }
void Awake() { menuManager = FindObjectOfType<MainMenuManager> (); }
/* Fin de l'écran des statistiques */ /***********************************/ void Awake() { if (mainMenuManager == null) mainMenuManager = GameObject.FindGameObjectWithTag ("GameMaster").GetComponent<MainMenuManager> (); sMusic = bMusic.GetComponentInChildren<Slider> (); sSfx = bSfx.GetComponentInChildren<Slider> (); sfxSound = GetComponentInChildren<SFXMenu> (); }
void Awake () { Logger.Log("MainMenuManager::Awake", Logger.Level.DEBUG); _instance = this; }
void Start() { mainMenuManagerScript = mainMenuManager.GetComponent<MainMenuManager>(); }