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();
        });
    }
    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);
                });
            });
        };
    }
Exemple #3
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);
         }
             );
     }
 }
Exemple #4
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;
         }
     });
 }
Exemple #5
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;
         }
     });
 }