private void selectedButton() { selectedButtonName = UnityEngine.EventSystems.EventSystem.current.currentSelectedGameObject.name; // gets the current clicked object name // we choose the behaviour depending on the button switch (selectedButtonName) { case CIRCLE_BUTTON: CirclePanelItemHolder.SetActive(true); currentPanelSelected = CirclePanelItemHolder; break; case DROP_BUTTON: DropPanelItemHolder.SetActive(true); currentPanelSelected = DropPanelItemHolder; break; case BUFF_BUTTON: BuffPanelItemHolder.SetActive(true); currentPanelSelected = BuffPanelItemHolder; break; } isPanelSelected = true; holdingPanel.SetActive(false); BackButton.SetActive(true); moveButtonsPanel.SetActive(true); populate(selectedButtonName); }
// Update is called once per frame void Update() { if (tutorialNum < 0) { tutorialNum = 0; } if (tutorialNum > 1) { tutorialNum = 1; } if (tutorialNum == 0) { BackButton.SetActive(false); NextButton.SetActive(true); tutorial0.SetActive(true); tutorial1.SetActive(false); } if (tutorialNum == 1) { BackButton.SetActive(true); NextButton.SetActive(false); tutorial0.SetActive(false); tutorial1.SetActive(true); } }
public void OnClickArcadeBurger(int mode) { PlayerPrefs.SetInt("RecipeSelected", mode); StartCoroutine(LoadLevel("Arcade Scene")); NextPanel(LoadingPanel); BackButton.SetActive(false); }
public void MoveBack() { BackButton.SetActive(false); ProfileButton.SetActive(false); QuickPlayButton.SetActive(false); FadeoutPaneltoMain.SetActive(true); }
IEnumerator FROM() { for (int i = 0; i < amount; i++) { var VFX = (GameObject)Instantiate(ThingToSpawn, originButton.transform.position, Quaternion.identity); VFX.transform.SetParent(parentForObject.transform); yield return(new WaitForSeconds(0.3f)); iTween.MoveTo(VFX, iTween.Hash("position", Destination.transform.position + offset, "easytype", easeType, "ignoretimescale", true, "time", time)); Destroy(VFX, time); yield return(new WaitForSeconds(rate)); } originButton.SetActive(false); ShopManager.Instance.AddDiamond(shopmanagerScript.EarningDiamonds); Debug.Log("vfx wali script se kara add"); if (giftReward != true) { RetryButton.SetActive(true); } if (giftReward == true) { BackButton.SetActive(true); } //Make the coin increase explosion here }
public void StartMatchmaking() { QuickPlayButton.SetActive(false); ProfileButton.SetActive(false); BackButton.SetActive(false); HeadingText.GetComponent <TextMeshProUGUI>().text = "Finding Match"; FindingMatch = true; }
void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { gameOverText.SetActive(true); BackButton.SetActive(true); } }
public void CancelMatchmaking() { QuickPlayButton.SetActive(true); ProfileButton.SetActive(true); BackButton.SetActive(true); HeadingText.GetComponent <TextMeshProUGUI>().text = "Choose Operation"; FindingMatch = false; MusicObject.GetComponent <AudioSource>().volume = 1.0f; }
public void OnClickArcade() { NextPanel(ArcadePanel); BackButton.SetActive(true); BackButton.GetComponent <Button>().onClick.AddListener(() => { NextPanel(MenuPanel); BackButton.SetActive(false); }); }
// Use this for initialization void Start() { playerName = PlayerPrefs.GetString("PlayerName"); if (playerName == "") { playerName = "PlayerName"; } mute = PlayerPrefs.GetInt("Mute") == 1 ? true : false; tilt = PlayerPrefs.GetInt("Tilt") == 1 ? true : false; if (tilt) { TiltButton.GetComponent <SpriteRenderer> ().sprite = tiltOn; } else { TiltButton.GetComponent <SpriteRenderer> ().sprite = tiltOff; } if (mute) { OnOffButton.GetComponent <SpriteRenderer> ().sprite = on; AudioListener.pause = true; } else { OnOffButton.GetComponent <SpriteRenderer> ().sprite = off; AudioListener.pause = false; } if (Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.WindowsPlayer || Application.platform == RuntimePlatform.WindowsWebPlayer) { TiltButton.GetComponent <SpriteRenderer>().color = new Color(1, 1, 1, 0.3f); tiltButtonEnabled = false; } hostOn.SetActive(false); joinOn.SetActive(false); NameButton.SetActive(false); TiltButton.SetActive(false); BackButton.SetActive(false); MuteButton.SetActive(false); OnOffButton.SetActive(false); textScale = (nameInputFieldStyle.fontSize * (Screen.width * 0.001f)); nameInputFieldStyle.fontSize = (int)textScale; serverNameLabel = nameInputFieldStyle; InvokeRepeating("GetHostList", 0.0f, 2.0f); }
void Start() { int ArrayLength = 9; totalLoop = ArrayLength - 1; objVideo = new GameObject[ArrayLength]; objVideoButton = new GameObject[ArrayLength]; VideoURL = new string[ArrayLength]; VideoPlayerControl = new VideoPlayer[ArrayLength]; FindAllVideos(); URLSetting(); BackButton.SetActive(false); ButtonMoveDown.SetActive(false); ButtonMoveUp.SetActive(true); ShowLimitedVideos(IntContentMove); }
public void SetIdle() { SetCommandVisibility(false, false); SetTargetVisibility(false); SetItemPanelVisibility(false, false); SetAbilityPanelVisibility(false, false); BackButton.SetActive(false); _currentSilenceStatus = false; _currentMpValue = -1; _currentCommandIndex = CommandMenu.Attack; _currentSubMenuIndex = -1; CurrentPlayerIndex = -1; //currentTranceTrigger = false; ButtonGroupState.DisableAllGroup(true); _partyDetail.SetDetailButtonState(UIButtonColor.State.Normal, false); }
void Update() { if (currentState == 1) { BackButton.SetActive(false); knockDoor.SetActive(false); next.SetActive(true); content.text = "Welcome to the doctor's interface tutorial. Please follow the blinking green square to familiarize yourself with the buttons."; heading.text = "Welcome!"; } else if (currentState == 2) { // knock door next.SetActive(false); BackButton.SetActive(true); knockDoor.SetActive(true); door.SetActive(false); content.text = "You can click on the 'Knock Door' button to knock the door."; heading.text = "Action Panel"; } else if (currentState == 3) { // inside/outside knockDoor.SetActive(false); door.SetActive(true); chat.SetActive(false); content.text = "You can click on the 'Inside/Outside' button to go inside/outside the room."; heading.text = "Action Panel"; } else if (currentState == 4) { // chat door.SetActive(false); chat.SetActive(true); mic.SetActive(false); content.text = "The chat box will open/close when you click on the Chat Box icon. You can communicate here if the voice feature does not work."; heading.text = "Chat Box"; } else if (currentState == 5) { // mic chat.SetActive(false); mic.SetActive(true); nav.SetActive(false); content.text = "You can do a real-time voice chat when you click on the Mic icon."; heading.text = "Voice Chat"; } else if (currentState == 6) { // nav mic.SetActive(false); nav.SetActive(true); pause.SetActive(false); content.text = "If you forget how to rotate your view, you can open the Turn View help window."; heading.text = "Turn View"; } else if (currentState == 7) { // pause nav.SetActive(false); pause.SetActive(true); examine.SetActive(false); content.text = "Clicking on the Pause icon will pause the role-play momentarily for a quick chat."; heading.text = "Time Out"; examineGuide.SetActive(false); transform.localScale = new Vector3(1, 1, 1); Loc2.transform.localScale = new Vector3(0, 0, 0); } else if (currentState == 8) { // examine pause.SetActive(false); examine.SetActive(true); washHands.SetActive(false); content.text = "Please click on the Examine button to start examining the patient. If you are not by the table, you will automatically be teleported."; heading.text = "Action Panel"; transform.localScale = new Vector3(0, 0, 0); Loc2.transform.localScale = new Vector3(1, 1, 1); if (GameObject.Find("examineGuide").transform.localScale != new Vector3(0, 0, 0)) { examineGuide.SetActive(true); examine.SetActive(false); } else { examineGuide.SetActive(false); examine.SetActive(true); } } else if (currentState == 9) { // wash hands Loc2.transform.localScale = new Vector3(0, 0, 0); transform.localScale = new Vector3(1, 1, 1); examineGuide.SetActive(false); examine.SetActive(false); washHands.SetActive(true); teleportGuide.SetActive(false); content.text = "Please click on the Wash Hands button to teleport to the sink."; heading.text = "Action Panel"; Loc4.transform.localScale = new Vector3(0, 0, 0); } else if (currentState == 10) { // teleport back to the table washHands.SetActive(false); if (GameObject.Find("teleportGuide").transform.localScale != new Vector3(0, 0, 0)) { teleportGuide.SetActive(true); } else { teleportGuide.SetActive(false); } content.text = "You can always press B on the keyboard to move back to the examination table, wherever you are."; heading.text = "Navigation"; transform.localScale = new Vector3(0, 0, 0); Loc4.transform.localScale = new Vector3(1, 1, 1); moodbarGuide.SetActive(false); Loc3.transform.localScale = new Vector3(0, 0, 0); } else if (currentState == 11) { // moodbar Loc4.transform.localScale = new Vector3(0, 0, 0); Loc3.transform.localScale = new Vector3(1, 1, 1); teleportGuide.SetActive(false); moodbarGuide.SetActive(true); minimize.SetActive(false); content.text = "The numbers in the moodbar indicate how many times the patient expressed its corresponding emotion."; heading.text = "Moodbar"; } else if (currentState == 12) { // minimize Loc3.transform.localScale = new Vector3(0, 0, 0); transform.localScale = new Vector3(1, 1, 1); moodbarGuide.SetActive(false); minimize.SetActive(true); exit.SetActive(false); content.text = "Clicking the Minimize button will minimize the program."; heading.text = "Minimize Application"; } else if (currentState == 13) { // exit minimize.SetActive(false); exit.SetActive(true); home.SetActive(false); NextButton.SetActive(true); content.text = "Clicking the Exit button will terminate and close the program."; heading.text = "Exit Application"; } /** * else if (currentState == 14) * { * // go home.SetActive(false); * exit.SetActive(false); * home.SetActive(true); * NextButton.SetActive(true); * content.text = "Clicking the Home button will terminate the session and go back to the Homescreen."; * heading.text = "Homescreen"; * } **/ else if (currentState == 14) { // Done content.text = "You have successfully finished the tutorial. To exit the tutorial, please quit the application using the Exit button."; heading.text = "Congratulations!"; NextButton.SetActive(false); } }
public void SetBackButtonEnable(bool set) { backButtonEnabled = set; BackButton.SetActive(set); }
private void Controller(string Output, int OutputNumber) { if (Output == "Video") { HideAllVideos(); objVideo[OutputNumber].SetActive(true); BackButton.SetActive(true); BackgroundPicture.SetActive(false); VideoPanelContent.SetActive(false); } if (Output == "BackMain") { HideAllVideos(); ShowAllVideosButtons(); BackButton.SetActive(false); VideoPanelContent.SetActive(true); BackgroundPicture.SetActive(true); ShowLimitedVideos(IntContentMove); } if (Output == "ContentMoveUp") { if (IntContentMove == 0) { IntContentMove = 1; ShowLimitedVideos(IntContentMove); ContentVideos.anchoredPosition = new Vector2(0.0f, 220.0f); ButtonMoveDown.SetActive(true); ButtonMoveUp.SetActive(true); } else if (IntContentMove == 1) { IntContentMove = 2; ShowLimitedVideos(IntContentMove); ContentVideos.anchoredPosition = new Vector2(0.0f, 430.0f); OnPointerUp(); // Put this at the end ButtonMoveDown.SetActive(true); ButtonMoveUp.SetActive(false); } } else if (Output == "ContentMoveDown") { if (IntContentMove == 1) { IntContentMove = 0; ShowLimitedVideos(IntContentMove); ContentVideos.anchoredPosition = new Vector2(0.0f, 0.0f); OnPointerUp(); // Put this at the start ButtonMoveDown.SetActive(false); ButtonMoveUp.SetActive(true); } else if (IntContentMove == 2) { IntContentMove = 1; ShowLimitedVideos(IntContentMove); ContentVideos.anchoredPosition = new Vector2(0.0f, 220.0f); ButtonMoveDown.SetActive(true); ButtonMoveUp.SetActive(true); } } // print ("IntContentMove: "+ IntContentMove); }
public void OnClickEndless() { NextPanel(LoadingPanel); BackButton.SetActive(false); StartCoroutine(LoadLevel("Endless Scene")); }
private void Update() { if (currentState == 1) { BackButton.SetActive(false); chat.SetActive(false); next.SetActive(true); content.text = "Welcome to the patient's interface tutorial. Please follow the blinking green square to familiarize yourself with the buttons."; heading.text = "Welcome!"; } else if (currentState == 2) { // chat next.SetActive(false); BackButton.SetActive(true); chat.SetActive(true); mic.SetActive(false); content.text = "The chat box will open/close when you click on the Chat Box icon. You can communicate here if the voice feature does not work."; heading.text = "Chat Box"; } else if (currentState == 3) { // mic chat.SetActive(false); mic.SetActive(true); nav.SetActive(false); content.text = "You can do a real-time voice chat when you click on the Mic icon."; heading.text = "Voice Chat"; } else if (currentState == 4) { // nav mic.SetActive(false); nav.SetActive(true); pause.SetActive(false); content.text = "If you forget how to rotate your view, you can open the Turn View help window."; heading.text = "Turn View"; } else if (currentState == 5) { // pause nav.SetActive(false); pause.SetActive(true); content.text = "Clicking on the Pause icon will pause the role-play momentarily for a quick chat."; heading.text = "Time Out"; terminate.SetActive(false); } else if (currentState == 6) { // terminate pause.SetActive(false); terminate.SetActive(true); sit.SetActive(false); content.text = "When you click on the End Session icon, you can end the session from all players' sides."; heading.text = "End Session"; } else if (currentState == 7) { // sit terminate.SetActive(false); sit.SetActive(true); actionPanel.SetActive(false); content.text = "Click on the Sit Down button to sit on the examination table."; heading.text = "Action Panel"; } else if (currentState == 8) { // actionpanels sit.SetActive(false); actionPanel.SetActive(true); undress.SetActive(false); content.text = "These are the actions you can perform while you are sitting down."; heading.text = "Action Panel"; } else if (currentState == 9) { // undress actionPanel.SetActive(false); undress.SetActive(true); content.text = "Let's start with the Change Clothes button."; heading.text = "Action Panel"; actionPanel.SetActive(false); } else if (currentState == 10) { // free actions undress.SetActive(false); actionPanel.SetActive(true); liedown.SetActive(false); content.text = "Please try all the action buttons until you feel comfortable."; heading.text = "Action Panel"; } else if (currentState == 11) { // lie down actionPanel.SetActive(false); liedown.SetActive(true); lyingActions.SetActive(false); content.text = "Now, let's try to lie down."; heading.text = "Action Panel"; } else if (currentState == 12) { // lie down actions liedown.SetActive(false); lyingActions.SetActive(true); standup.SetActive(false); content.text = "Great job! Please try these action buttons while you are lying down."; heading.text = "Action Panel"; } else if (currentState == 13) { // lie down actions transform.localScale = new Vector3(1, 1, 1); Loc2.transform.localScale = new Vector3(0, 0, 0); lyingActions.SetActive(false); standup.SetActive(true); moodbarEmoji.SetActive(false); content.text = "Now, try clicking on the Stand Up button to stand."; heading.text = "Action Panel"; } else if (currentState == 14) { // moodbar emoji transform.localScale = new Vector3(0, 0, 0); Loc2.transform.localScale = new Vector3(1, 1, 1); standup.SetActive(false); moodbarEmoji.SetActive(true); moodbarNums.SetActive(false); content2.text = "You can use the mood bar to express your emotion. Once clicked, both the patient and the doctor will see the emoji pop up from the patient's head."; heading2.text = "Mood Bar"; } else if (currentState == 15) { // mood num Loc3.transform.localScale = new Vector3(0, 0, 0); Loc2.transform.localScale = new Vector3(1, 1, 1); moodbarEmoji.SetActive(false); moodbarNums.SetActive(true); minimize.SetActive(false); content2.text = "The counters at the top records how many times each emoji was clicked."; heading2.text = "Mood Bar"; } else if (currentState == 16) { // minimize Loc2.transform.localScale = new Vector3(0, 0, 0); Loc3.transform.localScale = new Vector3(1, 1, 1); moodbarNums.SetActive(false); minimize.SetActive(true); exit.SetActive(false); content3.text = "Clicking the Minimize button will minimize the program."; heading3.text = "Minimize Application"; } else if (currentState == 17) { // exit minimize.SetActive(false); exit.SetActive(true); home.SetActive(false); NextButton.SetActive(true); Loc3NextBtn.SetActive(true); content3.text = "Clicking the Exit button will terminate and close the program."; heading3.text = "Exit Application"; } /** * else if (currentState == 18) * { * // go home.SetActive(false); * exit.SetActive(false); * home.SetActive(true); * NextButton.SetActive(true); * content3.text = "Clicking the Home button will terminate the session and go back to the Homescreen."; * heading3.text = "Homescreen"; * Loc3NextBtn.SetActive(true); * } **/ else if (currentState == 18) { // Done content3.text = "You have successfully finished the tutorial. To exit the tutorial, please click on the Home button at the top."; heading3.text = "Congratulations!"; NextButton.SetActive(false); Loc3NextBtn.SetActive(false); } }
// Start is called before the first frame update void Start() { gameOverText.SetActive(false); BackButton.SetActive(false); }