コード例 #1
0
 public static void CreateInstance(INpCloudManager listener)
 {
     if (NpCloudManager.instance != null)
     {
         return;
     }
     NpCloudManager.instance                              = new NpCloudManager(listener);
     NpCloudManager.instance.mRoomSystem                  = new NpCloudRoomSystem();
     NpCloudManager.instance.mRoomSystem.JoinRoom         = new Action <NpRoomParameter>(NpCloudManager.instance.mListener.OnJoinRoom);
     NpCloudManager.instance.mRoomSystem.LeaveRoom        = new Action <NpLeaveParameter>(NpCloudManager.instance.mListener.OnLeaveRoom);
     NpCloudManager.instance.mRoomSystem.RequestException = new Action <NpCloudErrorData>(NpCloudManager.instance.mListener.OnRequestException);
     NpCloudManager.instance.AddListener(NpCloudManager.instance.mRoomSystem);
     NpCloudManager.instance.mChatSystem                  = new NpCloudChatSystem();
     NpCloudManager.instance.mChatSystem.Message          = new Action <NpMessageParameter>(NpCloudManager.instance.mListener.OnMessage);
     NpCloudManager.instance.mChatSystem.RoomMsgLog       = new Action <List <NpRoomMsgLog> >(NpCloudManager.instance.mListener.OnRoomMsgLog);
     NpCloudManager.instance.mChatSystem.RequestException = new Action <NpCloudErrorData>(NpCloudManager.instance.mListener.OnRequestException);
     NpCloudManager.instance.AddListener(NpCloudManager.instance.mChatSystem);
 }
コード例 #2
0
 private NpCloudManager(INpCloudManager listener)
 {
     this.mListenerlist = new List <INpCloudManagerSystem>();
     this.mListener     = listener;
 }