Beispiel #1
0
 public static void publishBabyInstRes(COM_ShowbabyInstInfo InstInfo, ChatKind Kind)
 {
     if (PublishBabyInstResOk != null)
     {
         PublishBabyInstResOk(InstInfo, Kind);
     }
 }
Beispiel #2
0
    void Start()
    {
        btns.Add(SystemBtn);
        btns.Add(WorldBtn);
        btns.Add(GuildBtn);
        btns.Add(ContingentBtn);
        btns.Add(allBtn);
        Item.SetActive(false);
        meItem.SetActive(false);
        sysItem.SetActive(false);
        gameObject.GetComponent <UIPanel> ().depth = 10;
        //dikuang.transform.localPosition = new Vector3 (749,226,0);
        UIManager.SetButtonEventHandler(SystemBtn.gameObject, EnumButtonEvent.OnClick, OnClickSystem, 0, 0);
        UIManager.SetButtonEventHandler(WorldBtn.gameObject, EnumButtonEvent.OnClick, OnClickWorld, 1, 0);
        UIManager.SetButtonEventHandler(GuildBtn.gameObject, EnumButtonEvent.OnClick, OnClickGuild, 2, 0);
        UIManager.SetButtonEventHandler(ContingentBtn.gameObject, EnumButtonEvent.OnClick, OnClickContingent, 3, 0);
        UIEventListener.Get(VoiceBtn.gameObject).onPress = OnPrassVoice;
        UIManager.SetButtonEventHandler(ExpressionBtn.gameObject, EnumButtonEvent.OnClick, OnClickExpression, 0, 0);
        UIManager.SetButtonEventHandler(SendBtn.gameObject, EnumButtonEvent.OnClick, OnClickSend, 0, 0);
        UIManager.SetButtonEventHandler(SetBtn.gameObject, EnumButtonEvent.OnClick, OnClickSet, 0, 0);
        UIManager.SetButtonEventHandler(AreBtn.gameObject, EnumButtonEvent.OnClick, OnClickAre, 0, 0);
        UIManager.SetButtonEventHandler(allBtn.gameObject, EnumButtonEvent.OnClick, OnClicall, 4, 0);
        //UIEventListener.Get (chatminPanel).onClick = ShowSelfWindow;
        //UIEventListener.Get (chatmaxPanel).onClick = ShowSelfWindow;
        chatType = ChatKind.CK_World;
        BtnChoose(1);
        //ChatokOk (ChatSystem.ChatInfos);
        AddEvent();
        chatminPanel.GetComponent <ChatMinPanel> ().AddEvent();
        //chatmaxPanel.GetComponent<ChatMaxPanel> ().AddEvent ();
        SV = NGUITools.FindInParents <UIPanel>(gameObject);
        Vector2 size = SV.GetViewSize();

        nums = size.y / grid.cellHeight;
    }
Beispiel #3
0
 public static void publishItemInstRes(COM_ShowItemInstInfo ShowItem, ChatKind Kind)
 {
     if (PublishItemInstResOk != null)
     {
         PublishItemInstResOk(ShowItem, Kind);
     }
 }
Beispiel #4
0
    //system say
    public static void PushRecord(ChatKind ck, string content)
    {
        COM_ChatInfo c = new COM_ChatInfo();

        c.ck_      = ck;
        c.content_ = content;
        PushRecord(c);
    }
Beispiel #5
0
 private void OnClicall(ButtonScript obj, object args, int param1, int param2)
 {
     chatInput.GetComponentInChildren <UILabel> ().text = "";
     chatInput.GetComponent <BoxCollider> ().enabled    = true;
     BtnChoose(param1);
     chatType = ChatKind.CK_World;
     Refresh();
     //UpdataChatItem (ChatSystem.ChatInfos);
 }
Beispiel #6
0
 private void OnClickContingent(ButtonScript obj, object args, int param1, int param2)
 {
     chatInput.GetComponentInChildren <UILabel> ().text = "";
     chatInput.GetComponent <BoxCollider> ().enabled    = true;
     BtnChoose(param1);
     chatType = ChatKind.CK_Team;
     Refresh();
     UpdataChatItem(TeamChat);
 }
Beispiel #7
0
 private void OnClickSystem(ButtonScript obj, object args, int param1, int param2)
 {
     chatInput.GetComponent <BoxCollider> ().enabled    = false;
     chatInput.GetComponentInChildren <UILabel> ().text = "不能在此频道发言";
     BtnChoose(param1);
     chatType = ChatKind.CK_System;
     Refresh();
     UpdataChatItem(SysChat);
 }
Beispiel #8
0
    public void OpenAllChannel()
    {
        for (int i = 0; i < _OpenChannels.Length; ++i)
        {
            _OpenChannels[i] = true;
        }
        _SendChatKind = ChatKind.CK_World;
        //_Sb.value = 0;
        _IsDirty = true; //这个需要去查询吗,俄
//		_uinput.enabled = true;
//		_uinput.label.text = "";
//		_uinput.GetComponent<BoxCollider> ().enabled = true;
    }
Beispiel #9
0
    public void SwapSwitchWorldChannel()
    {
        for (int i = 0; i < _OpenChannels.Length; ++i)
        {
            _OpenChannels[i] = false;
        }
        _OpenChannels[(int)ChatKind.CK_World] = true;
        _SendChatKind = ChatKind.CK_World;
        //_Sb.value = 0;
        _IsDirty = true;
//		_uinput.enabled = true;
//		_uinput.label.text = "";
//		_uinput.GetComponent<BoxCollider> ().enabled = true;
    }
Beispiel #10
0
    public void SwapSwitchTeamChannel()
    {
        for (int i = 0; i < _OpenChannels.Length; ++i)
        {
            _OpenChannels[i] = false;
        }
        _OpenChannels[(int)ChatKind.CK_Team] = true;
        _SendChatKind = ChatKind.CK_Team;
        //_Sb.value = 0;
        _IsDirty = true;
//		if(!GamePlayer.Instance.GetOpenSubSystemFlag(OpenSubSystemFlag.OSSF_Team))
//		{
//			//PopText.Instance.Show(LanguageManager.instance.GetValue("duiwuweikai"));
//			_uinput.enabled = false;
//			_uinput.label.text = LanguageManager.instance.GetValue("duiwuweikai");
//			_uinput.GetComponent<BoxCollider> ().enabled = false;
//		}else
//		{
//			_uinput.enabled = true;
//			_uinput.label.text = "";
//			_uinput.GetComponent<BoxCollider> ().enabled = true;
//		}
    }
Beispiel #11
0
    public static void SendToServer(ChatKind ck, string target, string content, byte[] audio = null, int audioTime = 0)
    {
        if (content == "" && target == "" && audio == null)
        {
            return;
        }
        _SendRecords.AddLast(content);
        if (_SendRecords.Count > _SendRecordSize)
        {
            _SendRecords.RemoveFirst();
        }

        COM_Chat cc = new COM_Chat();

        cc.ck_ = ck;
        //if(content == "openlog")
        //{
        //    ApplicationEntry.Openlog = true;
        //}
        //else if(content == "closelog")
        //{
        //    ApplicationEntry.Openlog = false;
        //}
        if (content.IndexOf("^") == 0)
        {
            cc.ck_      = ChatKind.CK_GM;
            cc.content_ = content.Substring(1);
        }
        else
        {
            cc.audio_     = audio;
            cc.audioTime_ = audioTime;
            cc.content_   = content;
        }
        NetConnection.Instance.sendChat(cc, target);
    }
Beispiel #12
0
 public void Receive(ChatKind ck, string content)
 {
     textList.Add(content);
 }
Beispiel #13
0
 void PublishBabyInstRes(COM_ShowbabyInstInfo InstInfo, ChatKind Kind)
 {
     input.value = LanguageManager.instance.GetValue("wupinzhanshi").Replace("{t1}", "3").Replace("{t2}", InstInfo.showId_.ToString()).Replace("{t4}", GetBPinzhi(BabyData.GetData((int)InstInfo.babyId_))).Replace("{t3}", BabyData.GetData((int)InstInfo.babyId_)._Name);
 }
Beispiel #14
0
 void PublishItemInstRes(COM_ShowItemInstInfo ShowItem, ChatKind Kind)
 {
     input.value = LanguageManager.instance.GetValue("wupinzhanshi").Replace("{t1}", "2").Replace("{t2}", ShowItem.showId_.ToString()).Replace("{t4}", GetPinzhi(ItemData.GetData((int)ShowItem.itemId_))).Replace("{t3}", ItemData.GetData((int)ShowItem.itemId_).name_);
 }