public void ShowLevelSuccess(PopupPanel.PopupHandlerDelegate delegateMethod) { string popupTitle = "Level Complete!"; string popupMessage = "ROAR!!!"; string buttonText = "Next Level"; levelOutroPopupPanel.Setup(popupTitle, popupMessage, buttonText, delegateMethod); levelOutroPopupPanel.Enable(); }
public void ShowLevelIntro(LevelData level, int levelNum, PopupPanel.PopupHandlerDelegate delegateMethod) { string popupTitle = "Level " + (levelNum + 1).ToString(); string popupMessage = "Target: " + level.targetScore + "\nMoves: " + level.moves; string buttonText = "Play"; levelIntroPopupPanel.Setup(popupTitle, popupMessage, buttonText, delegateMethod); levelIntroPopupPanel.Enable(); }
void ItemClicked() { /*if(!open){ * useButton.gameObject.SetActive(true); * discardButton.gameObject.SetActive(true); * open = true; * } * else{ * useButton.gameObject.SetActive(false); * discardButton.gameObject.SetActive(false); * open = false; * }*/ panel.SetType(0); panel.Setup(item.description, UseItem, true); if (!item.Usable(player)) { panel.DisableConfirm(); } panel.gameObject.SetActive(true); if (panel.confirmButton.IsInteractable()) { panel.confirmButton.Select(); } else { panel.cancelButton.Select(); } menu.currentTab = 8; menu.currentItem = index; }
public override void StartEvent(GameObject tPanel, GameObject pPanel, Text mText, GameManager gameManager) { finished = false; camera = Camera.main; controller = camera.gameObject.GetComponent <CameraController>(); controller.CenterCameraOnObject(npc.transform, new Vector3(0, -2f, 0)); textPanel = tPanel; popupPanel = pPanel; messageText = mText; messageText.text = messages[0]; textPanel.SetActive(true); messageText.gameObject.SetActive(true); window = popupPanel.GetComponent <PopupPanel>(); i = 0; window.SetType(2); Func <bool> f = () => { messageText.text = messages[i]; i = -1; return(false); }; window.Setup("Take care of the crowned monster?", f, false); game = gameManager; setupFinished = true; /*while(popupPanel.activeSelf); * if(i == 6){ * messageText.text = messages[i]; * } * else{ * messageText.text = messages[7]; * while(!Input.GetKeyDown("space")); * messageText.text = messages[8]; * } * while(!Input.GetKeyDown("space")); * textPanel.SetActive(false); * controller.ResetCamera();*/ }