예제 #1
0
 public override void Initialize(EB.Sparx.Config config)
 {
     Instance.Api = new LTDailyAPI();
     Instance.Api.ErrorHandler += ErrorHandler;
     bounTask = GameDataSparxManager.Instance.Register <LTBounTaskData>("userTaskStatus");
     Hotfix_LT.Messenger.AddListener(EventName.AllRedPointDataRefresh, Instance.DataRefresh);
 }
예제 #2
0
        public override void Initialize(EB.Sparx.Config config)
        {
            Instance.Api = new LadderAPI();
            Instance.Api.ErrorHandler += ErrorHandler;

            Config = GameDataSparxManager.Instance.Register <LadderConfig>(LadderConfigDataId);
            Info   = GameDataSparxManager.Instance.Register <LadderInfo>(LadderInfoDataId);
            Logs   = GameDataSparxManager.Instance.Register <ArenaBattleLogs>(LadderBattleLogsDataId);
        }
예제 #3
0
        public override void Initialize(EB.Sparx.Config config)
        {
            s_endpoint = SparxHub.Instance.ApiEndPoint;
            Hotfix_LT.Messenger.AddListener <int, System.Action <EB.Sparx.Response> >(Hotfix_LT.EventName.CombatCleanUp, RequestExitCombat);
            Hotfix_LT.Messenger.AddListener(Hotfix_LT.EventName.DirectExitCombat, delegate() { BattleResultScreenController.DirectExitCombat(); });
            Hotfix_LT.Messenger.AddListener <string, Hashtable>(Hotfix_LT.EventName.DoDebugAction, DoDebugAction);

            LT.MainMessenger.AddListener <int, Action <Response> >("CombatEditorRequestExitCombat", RequestExitCombat);
        }
예제 #4
0
        public override void Initialize(EB.Sparx.Config config)
        {
            Instance.Api = new ArenaAPI();
            Instance.Api.ErrorHandler += ErrorHandler;

            Config     = GameDataSparxManager.Instance.Register <ArenaConfig>(ArenaConfigDataId);
            Info       = GameDataSparxManager.Instance.Register <ArenaInfo>(ArenaInfoDataId);
            Logs       = GameDataSparxManager.Instance.Register <ArenaBattleLogs>(ArenaBattleLogsDataId);
            Challenger = GameDataSparxManager.Instance.Register <ArenaChallenger>(ArenaChallengeListDataId);
        }
예제 #5
0
    public override void Initialize(EB.Sparx.Config config)
    {
        m_endPoint = Hub.ApiEndPoint;
        if (Debug.isDebugBuild)
        {
            DataLookupDebug.Create();
        }

        // PushManager should Initialize before DataLookupSparxManager
        EB.Sparx.PushManager pm = Hub.PushManager;
        if (pm != null)
        {
            pm.OnHandleMessage += new System.Action <string, string, object>(OnHandleMessage);
        }
    }
예제 #6
0
        public override void Initialize(EB.Sparx.Config config)
        {
            Instance.Api = new FriendAPI();
            Instance.Api.ErrorHandler += ErrorHandler;

            Config     = GameDataSparxManager.Instance.Register <FriendConfig>(FriendConfigId);
            Info       = GameDataSparxManager.Instance.Register <FriendInfo>(FriendInfoDataId);
            MyFriends  = GameDataSparxManager.Instance.Register <MyFriendList>(MyFriendListId);
            BlackLists = GameDataSparxManager.Instance.Register <BlackList>(BlacklistListId);
            Recentlys  = GameDataSparxManager.Instance.Register <RecentlyList>(RecentlyListId);
            Teams      = GameDataSparxManager.Instance.Register <TeamList>(TeamListId);
            Recommends = GameDataSparxManager.Instance.Register <RecommendList>(RecommendListId);
            Applys     = GameDataSparxManager.Instance.Register <ApplyList>(ApplyListId);

            ChatHistory = new ChatHistoryController();
            AcHistory   = new AllChatHistoryController();

            mDataMetas[MyFriendListId] = new FriendDataMeta(MyFriendListId, delegate() { GetInfo(); });
            mDataMetas[ApplyListId]    = new FriendDataMeta(ApplyListId, GetApplyList);
        }
예제 #7
0
        public override void Connect()
        {
            State = SubSystemState.Connected;

            string portraitId = EB.Dot.String("portraitId", Hub.Instance.DataStore.LoginDataStore.LoginData, "");

            if (portraitId != "")
            {
                SetPortrait(Hub.Instance.DataStore.LoginDataStore.LocalUserId.Value, portraitId, PortraitPriority.High);
            }

            EB.Sparx.Config config  = SparxHub.Instance.Config;
            EndPointOptions options = new EndPointOptions {
                Key = config.ApiKey.Value
            };
            Hashtable social = EB.Dot.Object("social", Hub.Instance.DataStore.LoginDataStore.LoginData, null);

            if (null == social)
            {
                return;
            }

            string endpointUrl = EB.Dot.String("endpoint", social, null);

            _imageBaseUrl   = EB.Dot.String("imageBase", social, null);;
            _socialEndPoint = EndPointFactory.Create(endpointUrl, options);

            _socialEndPoint.AddData("stoken", Hub.Instance.ApiEndPoint.GetData("stoken"));
            _api.SetSocialEndpoint(_socialEndPoint);

            _allowPullFriendsPortraitInfoUntil = new DateTimeRef(System.DateTime.Now);
            _allowPullAdHocPortraitInfoUntil   = new DateTimeRef(System.DateTime.Now);

            UpdateUniqueTimestamp();
            GetFriendsPortraitInfo(null);

            Hub.Instance.GetManager <PushManager>().OnDisconnected += OnPushDisconnected;
        }
예제 #8
0
 public override void Initialize(EB.Sparx.Config config)
 {
     m_endPoint = EB.Sparx.Hub.Instance.ApiEndPoint;
 }