Пример #1
0
        public static void Initialize(SocialMode?mode = null)
        {
            if (!mode.HasValue)
            {
                mode = new SocialMode?(SocialMode.None);
            }
            SocialAPI._mode                 = mode.Value;
            SocialAPI._modules              = new List <ISocialModule>();
            SocialAPI.JoinRequests          = new ServerJoinRequestsManager();
            Main.OnTickForInternalCodeOnly += new Action(SocialAPI.JoinRequests.Update);
            switch (SocialAPI.Mode)
            {
            case SocialMode.Steam:
                SocialAPI.LoadSteam();
                break;

            case SocialMode.WeGame:
                SocialAPI.LoadWeGame();
                break;
            }
            foreach (ISocialModule module in SocialAPI._modules)
            {
                module.Initialize();
            }
        }
Пример #2
0
 public static void Initialize(SocialMode?mode = null)
 {
     if (!mode.HasValue)
     {
         mode = new SocialMode?(SocialMode.None);
     }
     SocialAPI._mode    = mode.Value;
     SocialAPI._modules = new List <ISocialModule>();
     if (SocialAPI.Mode == SocialMode.Steam)
     {
         SocialAPI.LoadSteam();
     }
     foreach (ISocialModule module in SocialAPI._modules)
     {
         module.Initialize();
     }
 }
Пример #3
0
 public static void Initialize(SocialMode?mode = null)
 {
     if (!mode.HasValue)
     {
         mode = new SocialMode?(SocialMode.None);
         if (Program.LaunchParameters.ContainsKey("-steam"))
         {
             mode = new SocialMode?(SocialMode.Steam);
         }
     }
     SocialAPI._mode    = mode.Value;
     SocialAPI._modules = new List <ISocialModule>();
     if (SocialAPI.Mode == SocialMode.Steam)
     {
         SocialAPI.LoadSteam();
     }
     foreach (ISocialModule module in SocialAPI._modules)
     {
         module.Initialize();
     }
 }