Exemple #1
0
    private void Onupdate(float timeProcess)
    {
        //数据在这里转换
        lock (GetVs)
        {
            if (GetVs.Count > 0)
            {
                QueueData st = GetVs.Dequeue();
                Debug.Log("状态类里接收到的数据:" + st.msg);
                EventParamete eventParamete = new EventParamete();
                eventParamete.AddParameter(st.msg);
                switch (st.parmaterCodes)
                {
                case ParmaterCodes.index:
                    EventManager.TriggerEvent(GenericEventEnumType.Message, ParmaterCodes.index.ToString(), eventParamete);
                    break;

                case ParmaterCodes.BoatRotate:
                    EventManager.TriggerEvent(GenericEventEnumType.Message, ParmaterCodes.BoatRotate.ToString(), eventParamete);
                    break;

                default:
                    break;
                }


                //在这里进行switch对数据进行处理
            }
        }
    }
Exemple #2
0
    protected void SendButtonName()
    {
        EventParamete eventParamete = new EventParamete();

        eventParamete.AddParameter(this.name);
        EventManager.TriggerEvent(GenericEventEnumType.Message, "ButtonName", eventParamete);
    }
Exemple #3
0
    /// <summary>
    /// 切换UI Panel
    /// </summary>
    /// <param name="panelName"></param>
    public static void SwitchPanel(PanelName panelName)
    {
        EventParamete eventParamete = new EventParamete();

        eventParamete.AddParameter(panelName);
        EventManager.TriggerEvent(GenericEventEnumType.Message, MTFrame.EventType.PanelSwitch.ToString(), eventParamete);
    }
Exemple #4
0
    public static void SentRayEvent(RayEventName st)
    {
        EventParamete eventParamete = new EventParamete();

        eventParamete.AddParameter(st);
        EventManager.TriggerEvent(GenericEventEnumType.Message, MTFrame.MTEvent.EventType.RayEventName.ToString(), eventParamete);
    }
    private void SentToState(string msg)
    {
        EventParamete eventParamete = new EventParamete();

        eventParamete.AddParameter(msg);
        EventManager.TriggerEvent(GenericEventEnumType.Message, MTFrame.EventType.receiveMsg.ToString(), eventParamete);
    }
Exemple #6
0
    public static void PanelSwitch(PanelName panelName)
    {
        EventParamete eventParamete = new EventParamete();

        eventParamete.AddParameter <PanelName>(panelName);
        EventManager.TriggerEvent(GenericEventEnumType.Message, SwitchPanel.PanelToState.ToString(), eventParamete);
    }
Exemple #7
0
    public static void SwitchPanel(SwitchPanelEnum st)
    {
        EventParamete eventParamete = new EventParamete();

        eventParamete.AddParameter(st);
        EventManager.TriggerEvent(GenericEventEnumType.Message, SwitchPanelEvent, eventParamete);
        Debug.Log("切换面板===" + st.ToString());
    }
Exemple #8
0
    public void SceneChange(SceneName sceneName, PanelName panelName)
    {
        EventParamete eventParamete = new EventParamete();

        eventParamete.AddParameter(panelName);
        EventManager.TriggerEvent(GenericEventEnumType.Message, TransportType.SwitchPanel.ToString(), eventParamete);
        SceneSwitch data = new SceneSwitch();

        data.SceneName = sceneName.ToString();
        SendDataToSever(ParmaterCodes.SceneSwitch, data);
    }
Exemple #9
0
 private void Update()
 {
     //数据在这里转换
     lock (GetVs)
     {
         if (GetVs.Count > 0)
         {
             string st = GetVs.Dequeue();
             // LogText.text = st.ToString();
             EventParamete eventParamete = new EventParamete();
             eventParamete.AddParameter(st);
             EventManager.TriggerEvent(GenericEventEnumType.Message, MTFrame.EventType.DataToPanel.ToString(), eventParamete);
         }
     }
 }
Exemple #10
0
 private void Onupdate(float timeProcess)
 {
     //数据在这里转换
     lock (GetVs)
     {
         if (GetVs.Count > 0)
         {
             string st = GetVs.Dequeue();
             Debug.Log("状态类里接收到的数据:" + st);
             EventParamete eventParamete = new EventParamete();
             eventParamete.AddParameter(st);
             EventManager.TriggerEvent(GenericEventEnumType.Message, "bbb", eventParamete);
             //在这里进行switch对数据进行处理
         }
     }
 }