コード例 #1
0
    private void OnWordInputClick()
    {
        var keyboard = CRootManager.Instance.ShowPopup("KeyBoardPopup") as CKeyBoardPopup;

        keyboard.Setup(this.m_CurrentPrefix, (value) => {
            this.m_WordInputString    = value;
            this.m_WordInputText.text = CGameSetting.GetDisplayWord(value);
            keyboard.OnBackPress();
        });
        CSoundManager.Instance.Play("sfx_click");
    }
コード例 #2
0
    private void OnReceiveSuggestWord(SocketIO.SocketIOEvent ev)
    {
        // WORD SUGGEST
        var wordSuggest = ev.data.GetField("wordSuggest").ToString().Replace("\"", string.Empty);

        this.m_WordInputText.text = CGameSetting.GetDisplayWord(wordSuggest);
        this.m_WordInputString    = wordSuggest;
        CRootManager.Instance.BackTo("MainGamePanel");
        // GOLD COST
        var goldCost = int.Parse(ev.data.GetField("goldCost").ToString());

        CGameSetting.USER_GOLD -= goldCost;
        // GOLD
        this.m_GoldDisplayText.text       = CGameSetting.USER_GOLD.ToString();
        this.m_SuggestButton.interactable = true;
    }