IEnumerator getReady()
    {
        print("READY");
        tC.setText("READY");
        yield return(new WaitForSeconds(2f));

        print("SET");
        tC.setText("SET");
        yield return(new WaitForSeconds(2f));

        print("REVEAL");
        tC.setText("REVEAL");
        tC.startFadeOffScreen();
        yield return(new WaitForSeconds(3f));
    }
예제 #2
0
    public void updateChat(C_BasePacket chat)
    {
        if (chat.m_basicType != BasePacketType.basePacketTypeSocial)
        {
            return;
        }
        C_BaseSocialPacket data = (C_BaseSocialPacket)chat;

        if (((data.m_socialType == SocialPacketType.packetTypeSocialChatFriendResponse) ||
             (data.m_socialType == SocialPacketType.packetTypeSocialChatGuildResponse) ||
             (data.m_socialType == SocialPacketType.packetTypeSocialChatNormalResponse)) == false)
        {
            return;
        }


        RectTransform curParent   = null;
        string        curChatText = string.Empty;
        Color         color       = Color.white;
        ScrollRect    curRect     = null;

        switch (data.m_socialType)
        {
        case SocialPacketType.packetTypeSocialChatNormalResponse:
            C_SocialPacketChatNormalResponse curData = (C_SocialPacketChatNormalResponse)data;
            curParent   = m_chatBoxParentRectTransform_All;
            curChatText = curData.m_nickname + " : " + curData.m_message;
            curRect     = m_scrollRect_All;
            if (m_curChatType != CHAT_TYPE.ALL_CHAT)
            {
                m_NewIcon_AllTab.SetActive(true);
            }
            break;

        case SocialPacketType.packetTypeSocialChatFriendResponse:
            //C_SocialPacketChatRornalResponse curData = (C_SocialPacketChatRornalResponse)data;
            //curParent = m_chatBoxParentRectTransform_Whisper;
            //curChatText = chat.m_source + "->" + chat.m_target + " : " + chat.m_message;
            //curRect = m_scrollRect_Whisper;
            //color = Color.red;
            //// 채팅 탭이 현재 같은 타입 아니라면 new icon
            //if (m_curChatType != CHAT_TYPE.WHISPER_CHAT)
            //{
            //    // 유저가 쓴 귓속말이 아니면 new icon
            //    if (GameManager.m_Instance.getUserID().CompareTo(chat.m_source) != 0)
            //        m_NewIcon_WhisperTab.SetActive(true);
            //}
            break;

        case SocialPacketType.packetTypeSocialChatGuildResponse:
            //curParent = m_chatBoxParentRectTransform_Guild;
            //curChatText = chat.m_source + " : " + chat.m_message;
            //curRect = m_scrollRect_Guild;
            //if (m_curChatType != CHAT_TYPE.GUILD_CHAT)
            //    m_NewIcon_GuildTab.SetActive(true);
            break;
        }
        textController curTextController = Instantiate(m_TextPrefab, curParent).GetComponent <textController>();

        curTextController.setText(curChatText, color);
        m_TextList.Add(curTextController.gameObject);
        curParent.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, 10 + m_TextList.Count * m_offset_Y);
        curRect.normalizedPosition = Vector2.zero;
    }