コード例 #1
0
        private void ShowKongregateConnect(int marginLeft, int marginTop)
        {
            GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Please open the game on Kongregate an input the Kongregate Name and Id to the input-fields below.");
            marginTop += 60;
            GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Kongregate Id: ");
            string s = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.KongIdInput.ToString());

            long.TryParse(s, out ConnectArea.KongIdInput);
            marginTop += 40;
            GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Kongregate Name: ");
            ConnectArea.KongNameInput = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.KongNameInput);
            marginTop += 60;
            if (App.CurrentPlattform == Plattform.Steam)
            {
                GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "If you get the Kongregate Save, you can't get achievements in Steam!");
                marginTop += 35;
            }
            if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Get Kongregate Save", "This will overwrite your current save, then import the online save from Kongregate, if the id and name are correct. Loading online in Kongregate will then connect your saves.")))
            {
                UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
                UpdateStats.GetKongSaveAfterConnecting = true;
            }
            marginTop += 40;
            if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Overwrite Kongregate Save", "This will overwrite your Kongregate online save if the id and name are correct. Loading online in Kongregate will then move your current save to Kongregate and connect the saves.")))
            {
                UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
                UpdateStats.OverwriteKongSave = true;
            }
        }
コード例 #2
0
 private void LoadOnline()
 {
     if (UpdateStats.TimeSinceLastOnlineRequest < 60L)
     {
         GuiBase.ShowToast("You need to wait another " + (60L - UpdateStats.TimeSinceLastOnlineRequest) + " seconds to load your online save.");
     }
     else
     {
         GuiBase.ShowDialog("This will overwrite your current data.", "Are you sure you want that?", delegate
         {
             UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.UserRequest);
         }, delegate
         {
         }, "Yes", "No", false, false);
     }
 }
コード例 #3
0
 private void ShowAndroidConnect(int marginLeft, int marginTop)
 {
     GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Please open the game on Android an input the Android Name and Id to the input-fields below.");
     marginTop += 60;
     GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Android Id: ");
     ConnectArea.AndroidIdInput = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.AndroidIdInput);
     marginTop += 40;
     GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Android Name: ");
     ConnectArea.AndroidNameInput = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.AndroidNameInput);
     marginTop += 50;
     if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Get Android Save", "This will overwrite your current save, then import the online save from Android, if the id and name are correct. Loading online in Android will then connect your saves.")))
     {
         UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
         UpdateStats.GetAndroidSaveAfterConnecting = true;
     }
     marginTop += 40;
     if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Overwrite Android Save", "This will overwrite your Android online save if the id and name are correct. Loading online in Android will then move your current save to Android and connect the saves.")))
     {
         UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
         UpdateStats.OverwriteAndroidSave = true;
     }
 }
コード例 #4
0
        private void ShowSteamConnect(int marginLeft, int marginTop)
        {
            GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Please open the game on Steam an input the Steam Name and Id to the input-fields below.");
            marginTop += 60;
            GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Steam Id: ");
            string s = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.SteamIdInput.ToString());

            long.TryParse(s, out ConnectArea.SteamIdInput);
            marginTop += 40;
            GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Steam Name: ");
            ConnectArea.SteamNameInput = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.SteamNameInput);
            marginTop += 60;
            if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Get Steam Save", "This will overwrite your current save, then import the online save from Steam, if the id and name are correct. Loading online in Steam will then connect your saves.")))
            {
                UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
                UpdateStats.GetSteamSaveAfterConnecting = true;
            }
            marginTop += 40;
            if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Overwrite Steam Save", "This will overwrite your Steam online save if the id and name are correct. Loading online in Steam will then move your current save to Steam and connect the saves.")))
            {
                UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
                UpdateStats.OverwriteSteamSave = true;
            }
        }