Esempio n. 1
0
 private void Awake()
 {
     instance     = this;
     acceptButton = transform.Find("acceptButton").GetComponent <UI_Button>();
     cancelButton = transform.Find("cancelButton").GetComponent <UI_Button>();
     popupText    = transform.Find("popupText").GetComponent <Text>();
     inputField   = transform.Find("inputField").GetComponent <TMPro.TMP_InputField>();
 }
Esempio n. 2
0
    private void Awake()
    {
        instance = this;

        okBtn     = transform.Find("okBtn").GetComponent <Button_UI>();
        cancelBtn = transform.Find("cancelBtn").GetComponent <Button_UI>();

        Hide();
    }
    private void Awake()
    {
        instance = this;

        okBtn      = transform.Find("okBtn").GetComponent <Button_UI>();
        cancelBtn  = transform.Find("cancelBtn").GetComponent <Button_UI>();
        titleText  = transform.Find("titleText").GetComponent <TextMeshProUGUI>();
        inputField = transform.Find("inputField").GetComponent <TMP_InputField>();

        Hide();
    }
    private void Map_OnEntireMapRevealed(object sender, System.EventArgs e)
    {
        isGameActive = false;
        int timeScore = Mathf.FloorToInt(timer);

        UI_Blocker.Show_Static();
        UI_InputWindow.Show_Static("Player Name", "", "ABCDEFGHIJKLMNOPQRSTUVXYWZ", 3, () => {
            // Cancel
            UnityEngine.SceneManagement.SceneManager.LoadScene(0);
        }, (string playerName) => {
            // Ok
            HighscoreTable.Instance.Show();
            HighscoreTable.Instance.AddHighscoreEntry(timeScore, playerName);
            UI_PlayAgain.Instance.Show();
        });
    }
Esempio n. 5
0
    private void Start()
    {
        transform.Find("submitScoreBtn").GetComponent <Button_UI>().ClickFunc = () => {
            UI_Blocker.Show_Static();

            UI_InputWindow.Show_Static("Score", 0, () => {
                UI_Blocker.Hide_Static();
            }, (int score) => {
                UI_InputWindow.Show_Static("Player Name", "", "ABCDEFGIJKLMNOPQRSTUVXYWZ", 3, () => {
                    UI_Blocker.Hide_Static();
                }, (string nameText) => {
                    UI_Blocker.Hide_Static();
                    highscoreTable.AddHighscoreEntry(score, nameText);
                });
            });
        };
    }
Esempio n. 6
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.Return))
     {
         UI_InputWindow.Show_Static(
             "Say what?",
             "",
             "abcdefghijklmnopqrstuvxywz! ABCDEFGHIJKLMNOPQRSTUVXYWZ,.?",
             50,
             () => {
         },
             (string inputText) => {
             ChatBubble.Create(transform, new Vector3(3, 8), ChatBubble.IconType.Happy, inputText);
         }
             );
     }
 }
Esempio n. 7
0
 private void CustumerBuyStackableItem(ItemDatum itemDatum)
 {
     UI_InputWindow.Show_Static("몇개를 구매하시겠습니까?", "1234567890",
                                (int amount) =>
     {
         if (true == shop.IsPlayerAffordable(itemDatum, amount))
         {
             shop.PlayerTryToBuyStackableItem(itemDatum, amount);
             return;
         }
         else
         {
             //pop up buying failure message
             Debug.Log("Stackable buy Failure");
             return;
         }
     });
 }
Esempio n. 8
0
 private void CustumerSellStackableItem(Item item)
 {
     UI_InputWindow.Show_Static("몇개를 판매하시겠습니까?", "1234567890",
                                (int amount) =>
     {
         IStackableItem stackableItem = item as IStackableItem;
         if (stackableItem.GetAmount() >= amount)
         {
             shop.PlayerSellStackableItem(item, amount);
             return;
         }
         else
         {
             //pop up buying failure message
             Debug.Log("Stackable Sell Failure");
             return;
         }
     });
 }