Exemplo n.º 1
0
        public void Login(PlatformEnums.Login loginType, PlatformEnums.Backend backendType)
        {
            IBackendPlatform backerndPlatform;

            if (backendPlatformDictionary.TryGetValue(backendType, out backerndPlatform))
            {
                ILoginPlatform loginPlatform;

                if (loginDictionary.TryGetValue(loginType, out loginPlatform))
                {
                    //login
                    currentBackend = backerndPlatform;
                    backerndPlatform.Init();
                    loginPlatform.SignIn();
                    currentLoginPlatform = loginPlatform;
                }
                else
                {
                    Debug.LogError("Can't find login platform: " + loginType);
                }
            }
            else
            {
                Debug.LogError("Can't find backend: " + backendType);
            }
        }
Exemplo n.º 2
0
 public void AddLoginPlatform(PlatformEnums.Login loginName, ILoginPlatform loginPlatform)
 {
     loginDictionary.Add(loginName, loginPlatform);
 }