示例#1
0
    private int m_BufferSize         = 0; //数组的实际占用的长度

    public override void Init()
    {
        SocketUnPack.Init();
        EventTool.Add <byte[]>(EventName.SocketClient.Send, send);
        EventTool.Add <string, int>(EventName.SocketClient.ConnectServer, connectServer);
        EventTool.Add(EventName.SocketClient.CloseConnect, closeConnect);
    }
示例#2
0
 public override void Init()
 {
     EventTool.Add <string>(EventName.PanelBase.Init, initPanelBase);
     EventTool.Add <string>(EventName.PanelBase.Open, (panelBaseName) => { openPanelBase(panelBaseName, null); });
     EventTool.Add <string>(EventName.PanelBase.Close, (panelBaseName) => { closePanelBase(panelBaseName, null); });
     EventTool.Add <string, PanelBaseEnterAni[]>(EventName.PanelBase.Open2, openPanelBase);
     EventTool.Add <string, PanelBaseExitAni[]>(EventName.PanelBase.Close2, closePanelBase);
 }
示例#3
0
    public override void Init()
    {
        EventTool.Add <PhPRequestData>(EventName.HttpServerMng.AddRequest, onAddRequest);
        EventTool.Add <string>(EventName.HttpServerMng.RemoveRequest, onRemoveRequest);
        EventTool.Add <PhPRequestData>(EventName.HttpServerMng.RequestOnly, onRequestOnly);
        EventTool.Add <string>(EventName.Loginl.LoginSuccess, onLoginSuccess);

        base.Init();
        StartCoroutine(request());
    }
示例#4
0
 public override void Init()
 {
     EventTool.Add("hall", "setting.audioVal", "AudioMng", (_tab) =>
     {
         audioVal       = _tab.Get <float>("val");
         clickAS.volume = audioVal;
     });
     EventTool.Add("hall", "setting.musicVal", "AudioMng", (_tab) =>
     {
         musicVal    = _tab.Get <float>("val");
         bgAS.volume = musicVal;
     });
     if (PlayerPrefs.HasKey("hall.config"))
     {
         Hashtable config = MiniJSON.jsonDecode(PlayerPrefs.GetString("hall.config")) as Hashtable;
         audioVal = float.Parse((config ["hall"] as Hashtable) ["audioVal"].ToString());
         musicVal = float.Parse((config ["hall"] as Hashtable) ["musicVal"].ToString());
     }
     bgAS.volume = musicVal;
     base.Init();
 }
示例#5
0
 public override void Init()
 {
     EventTool.Add <string>(EventName.Audio.PlayBG, playBG);
     EventTool.Add <string>(EventName.Audio.PlayOnly, playBG);
 }
示例#6
0
 public override void Init()
 {
     EventTool.Add <PanelBaseName>(EventName.PanelBase.Init, initPanelBase);
     EventTool.Add <PanelBaseName>(EventName.PanelBase.Open, openPanelBase);
     EventTool.Add <PanelBaseName>(EventName.PanelBase.Close, closePanelBase);
 }
示例#7
0
 public static void Init()
 {
     EventTool.Add <byte[]>(EventName.SocketClient.ReceiveData, receivData);
 }