Parcourir la source

Update project

aleksey il y a 3 ans
Parent
commit
6b10a5a74a
25 fichiers modifiés avec 146 ajouts et 77 suppressions
  1. 26 2
      Unity3/Assets/2021/Scenes/Main.unity
  2. 1 1
      Unity3/Assets/AssetBundling/AssetBundleUtils.cs
  3. 0 1
      Unity3/Assets/Core/ServerTime.cs
  4. 5 5
      Unity3/Assets/Core/Utils/Editor/WebUtilsTests.cs
  5. 2 2
      Unity3/Assets/FacebookSDK/Examples/Scripts/SubMenus/DialogShare.cs
  6. 2 2
      Unity3/Assets/GameCore/FacebookHelper.cs
  7. 5 5
      Unity3/Assets/GameCore/GameConstants.cs
  8. 13 7
      Unity3/Assets/GameCore/LevelManagement/LevelFromDiskGameEntitySpawnManager.cs
  9. 8 1
      Unity3/Assets/GameCore/LevelManagement/SpawnData.cs
  10. 9 4
      Unity3/Assets/GameCore/Managers/VideoManager.cs
  11. 0 1
      Unity3/Assets/GameObjects/CondomDispenser/CondomDispenser.cs
  12. 0 5
      Unity3/Assets/GameObjects/Enemies/Movement/HorizontalMovement.cs
  13. BIN
      Unity3/Assets/Plugins/Android/com.facebook.android.facebook-common-9.1.1.aar
  14. BIN
      Unity3/Assets/Plugins/Android/com.facebook.android.facebook-core-9.1.1.aar
  15. 16 8
      Unity3/Assets/SocialNetworking/Scripts/SocialPlatform/GameDatabaseManager.cs
  16. 5 3
      Unity3/Assets/SocialNetworking/Scripts/WrapperFB.cs
  17. 10 2
      Unity3/Assets/UI/Buttons/ButtonMenuTransitionEvent.cs
  18. 1 1
      Unity3/Assets/UI/Buttons/InvisibleButtonForAVFacebookPage.cs
  19. 5 6
      Unity3/Assets/UI/LevelSelector.cs
  20. 4 2
      Unity3/Assets/UI/Objectives/GameOverScreenTitle.cs
  21. 11 10
      Unity3/Assets/UI/Objectives/ObjectivesDialog.cs
  22. 14 1
      Unity3/Assets/UI/Screens/ChangeLoginPopup.cs
  23. 1 1
      Unity3/Assets/UI/Screens/DownloadImageFromServer.cs
  24. 1 3
      Unity3/Assets/UI/Screens/DownloadVideoFromServer.cs
  25. 7 4
      Unity3/Assets/Unity Technologies/SignInWithApple/Samples/Scripts/SignInWithAppleTest_Callbacks.cs

+ 26 - 2
Unity3/Assets/2021/Scenes/Main.unity

@@ -11429,6 +11429,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 1
   transition: 5
 --- !u!114 &292771866
 MonoBehaviour:
@@ -16745,6 +16746,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 7
 --- !u!114 &425092833
 MonoBehaviour:
@@ -18203,6 +18205,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 1
   isResumePause: 0
+  isNextLevel: 0
   transition: 5
 --- !u!114 &449225726
 MonoBehaviour:
@@ -23291,6 +23294,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 1
+  isNextLevel: 0
   transition: 5
 --- !u!1 &642330519
 GameObject:
@@ -23446,6 +23450,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 8
 --- !u!114 &642330527
 MonoBehaviour:
@@ -26768,6 +26773,7 @@ MonoBehaviour:
   IsNextLevel: 1
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 2
 --- !u!114 &753489887
 MonoBehaviour:
@@ -28460,6 +28466,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 5
 --- !u!114 &797556527
 MonoBehaviour:
@@ -32721,6 +32728,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 5
 --- !u!1 &954334761
 GameObject:
@@ -34671,7 +34679,7 @@ GameObject:
   m_Icon: {fileID: 0}
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_IsActive: 0
 --- !u!224 &1014258048
 RectTransform:
   m_ObjectHideFlags: 0
@@ -37151,6 +37159,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 2
 --- !u!114 &1096937201
 MonoBehaviour:
@@ -37463,6 +37472,7 @@ MonoBehaviour:
   IsNextLevel: 1
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 2
 --- !u!114 &1101535097
 MonoBehaviour:
@@ -40207,7 +40217,7 @@ RectTransform:
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0, y: 0.91}
   m_AnchorMax: {x: 0.052, y: 1}
-  m_AnchoredPosition: {x: 19, y: 45.500015}
+  m_AnchoredPosition: {x: 19, y: 45.5}
   m_SizeDelta: {x: -96.10254, y: 9}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!1 &1155985925
@@ -42998,6 +43008,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 12
 --- !u!114 &1215946660
 MonoBehaviour:
@@ -47958,6 +47969,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 7
 --- !u!114 &1327137805
 MonoBehaviour:
@@ -52364,6 +52376,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 8
 --- !u!1 &1419010098
 GameObject:
@@ -58100,6 +58113,7 @@ MonoBehaviour:
   LogoMainMenuDurexDenmark: {fileID: 0}
   LogoMainMenuDurex: {fileID: 0}
   IsGetLifeInGame: 0
+  UIDIOSMOPUB: 03e1670f699e48d2ae082159f92d785a
   curUIDMopub: 
   ActivateInvate: 1
   CurState: 0
@@ -72370,6 +72384,7 @@ MonoBehaviour:
   IsNextLevel: 1
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 2
 --- !u!114 &1665732101
 MonoBehaviour:
@@ -74377,6 +74392,8 @@ MonoBehaviour:
   m_Name: 
   m_EditorClassIdentifier: 
   showOnStart: 1
+  ParentAndroid: {fileID: 1014258047}
+  ParentIos: {fileID: 1662837274}
 --- !u!223 &1707092698
 Canvas:
   m_ObjectHideFlags: 0
@@ -78832,6 +78849,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 5
 --- !u!114 &1842513988
 MonoBehaviour:
@@ -80167,6 +80185,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 1
 --- !u!114 &1889691298
 MonoBehaviour:
@@ -80646,6 +80665,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 7
 --- !u!1 &1897415087
 GameObject:
@@ -81093,6 +81113,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 1
   transition: 5
 --- !u!114 &1910789764
 MonoBehaviour:
@@ -88197,6 +88218,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 5
 --- !u!114 &2088758563
 MonoBehaviour:
@@ -89499,6 +89521,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 2
 --- !u!114 &2122653690
 MonoBehaviour:
@@ -89903,6 +89926,7 @@ MonoBehaviour:
   IsNextLevel: 0
   IsCloseVirus: 0
   isResumePause: 0
+  isNextLevel: 0
   transition: 4
 --- !u!223 &2129475152
 Canvas:

+ 1 - 1
Unity3/Assets/AssetBundling/AssetBundleUtils.cs

@@ -3,7 +3,7 @@ using System.Collections;
 
 public class AssetBundleUtils
 {
-	const string ASSET_BUNDLES_BASE_URL = "http://game.gamatic.com/app_condom_dk/AssetBundles/";
+	const string ASSET_BUNDLES_BASE_URL = "https://game.gamatic.com/app_condom_dk/AssetBundles/";
 	
 	public static string GetAssetBundlesURL()
 	{

+ 0 - 1
Unity3/Assets/Core/ServerTime.cs

@@ -48,7 +48,6 @@ public class ServerTime : MonoBehaviour
 		string url = GameConstants.SERVER_BASE_URL + "serverTime.php";
 		var unityWebRequest = new UnityWebRequest(url);
 		yield return new WaitForSeconds(3);
-		Debug.Log("LoadServerTimeRoutine ");
 		//RetrieveServerTime(OnGetTime);
 		StartCoroutine(AwaitRequest(unityWebRequest,Results));
 	}

+ 5 - 5
Unity3/Assets/Core/Utils/Editor/WebUtilsTests.cs

@@ -11,14 +11,14 @@ namespace CoreTests
 		[Test]
 		public void TestNoParameters()
 		{
-			var p = WebUtils.ParseParametersFromQueryString("http://www.google.com/");
+			var p = WebUtils.ParseParametersFromQueryString("https://www.google.com/");
 			//Assert.True(p.Count == 0, "query parameters length should be zero");
 		}
 	
 		[Test]
 		public void TestWithSingleParameter()
 		{
-			var p = WebUtils.ParseParametersFromQueryString("http://www.google.com/?q=hello");
+			var p = WebUtils.ParseParametersFromQueryString("https://www.google.com/?q=hello");
 			//Assert.True(p.Count == 1, "query parameters length should be 1");
 			//Assert.True(p["q"] == "hello", "query parameter incorrect");
 		}
@@ -26,7 +26,7 @@ namespace CoreTests
 		[Test]
 		public void TestWithMultipleParameters()
 		{
-			var p = WebUtils.ParseParametersFromQueryString("http://www.google.com/?q=hello&x=123");
+			var p = WebUtils.ParseParametersFromQueryString("https://www.google.com/?q=hello&x=123");
 			//Assert.True(p.Count == 2, "query parameters length should be 2");
 			//Assert.True(p["q"] == "hello", "query parameter incorrect");
 			//Assert.True(p["x"] == "123", "query parameter incorrect");
@@ -37,7 +37,7 @@ namespace CoreTests
 		{
 			var unescapedValue = "hello there";
 			var escapedValue = WWW.EscapeURL(unescapedValue);
-			var p = WebUtils.ParseParametersFromQueryString("http://www.google.com/?q="+escapedValue);
+			var p = WebUtils.ParseParametersFromQueryString("https://www.google.com/?q="+escapedValue);
 			//Assert.True(p.Count == 1, "query parameters length should be 1");
 			//Assert.True(p["q"] == unescapedValue, "query parameter incorrect");
 		}
@@ -47,7 +47,7 @@ namespace CoreTests
 		{
 			var unescapedKey = "this is a query parameter";
 			var escapedKey = WWW.EscapeURL(unescapedKey);
-			var p = WebUtils.ParseParametersFromQueryString("http://www.google.com/?"+escapedKey+"=hello");
+			var p = WebUtils.ParseParametersFromQueryString("https://www.google.com/?"+escapedKey+"=hello");
 			//Assert.True(p.Count == 1, "query parameters length should be 1");
 			//Assert.True(p[unescapedKey] == "hello", "query parameter incorrect");
 		}

+ 2 - 2
Unity3/Assets/FacebookSDK/Examples/Scripts/SubMenus/DialogShare.cs

@@ -32,7 +32,7 @@ namespace Facebook.Unity.Example
         private string shareLink = "https://developers.facebook.com/";
         private string shareTitle = "Link Title";
         private string shareDescription = "Link Description";
-        private string shareImage = "http://i.imgur.com/j4M7vCO.jpg";
+        private string shareImage = "https://i.imgur.com/j4M7vCO.jpg";
 
         // Custom Feed Share
         private string feedTo = string.Empty;
@@ -40,7 +40,7 @@ namespace Facebook.Unity.Example
         private string feedTitle = "Test Title";
         private string feedCaption = "Test Caption";
         private string feedDescription = "Test Description";
-        private string feedImage = "http://i.imgur.com/zkYlB.jpg";
+        private string feedImage = "https://i.imgur.com/zkYlB.jpg";
         private string feedMediaSource = string.Empty;
 
         protected override bool ShowDialogModeSelector()

+ 2 - 2
Unity3/Assets/GameCore/FacebookHelper.cs

@@ -883,7 +883,7 @@ public class FacebookHelper : MonoBehaviour
 		int score = GameDataManager.Instance.Score;
 		string replayData = RecordingManager.Instance.GetReplayData();
 		Debug.Log("Score " + score + " " + LevelsManager.Instance.CurrentLevelIndex);
-		SubmitScore(LevelsManager.Instance.CurrentLevelIndex, score, replayData);
+		SubmitScore(LevelsManager.Instance.CurrentLevelIndex++, score, replayData);
 	}
 
 	void SubmitScore(int levelIndex, int score, string replayData)
@@ -914,7 +914,7 @@ public class FacebookHelper : MonoBehaviour
 			});
 		} else
 		{
-			AVDebug.Log("Player has not liked page, logged in to facebook or isOffline...");
+			Debug.Log("Player has not liked page, logged in to facebook or isOffline... " + SocialManager.Instance.userID + " " + ConnectivityPollManager.HasInternet);
 		}
 	}
 

+ 5 - 5
Unity3/Assets/GameCore/GameConstants.cs

@@ -4,14 +4,14 @@
 	//They are not pixels as such, but on iPad1/2 they map to pixels
 	public static int GAME_WIDTH;
 	public static int GAME_HEIGHT;
-	public static string BANNER_ADS = "http://game.gamatic.com/iCTS/BannerAD/config.json";
-	public static string VIDEO_ADS = "http://game.gamatic.com/iCTS/Video/config.json";
+	public static string BANNER_ADS = "https://game.gamatic.com/iCTS/BannerAD/config2.json";
+	public static string VIDEO_ADS = "https://game.gamatic.com/iCTS/Video/config.json";
 
 	//TODO Change these on release to the appropriate facebook page
 	public const string LIKE_PAGE_ID = "112791158753556";
-	public const string PAGE_TO_LIKE = "http://www.facebook.com/kunmedkondom";
-	public const string PLAY_GAME_URL = "http://apps.facebook.com/rubitgame";
-	public const string FACEBOOK_POST_IMAGE = "http://game.gamatic.com/RubIt/facebookShareWonChallenge.png";
+	public const string PAGE_TO_LIKE = "https://www.facebook.com/kunmedkondom";
+	public const string PLAY_GAME_URL = "https://apps.facebook.com/rubitgame";
+	public const string FACEBOOK_POST_IMAGE = "https://game.gamatic.com/RubIt/facebookShareWonChallenge.png";
 
 	public const string SECRET_KEY = "dr3@mtH3at3r";
 

+ 13 - 7
Unity3/Assets/GameCore/LevelManagement/LevelFromDiskGameEntitySpawnManager.cs

@@ -293,15 +293,21 @@ public class LevelFromDiskGameEntitySpawnManager : GameEntitySpawnManager
 				};
 
 				EnemyType enemyType = (EnemyType)data.type;
-				
-				enemyComponent = _enemyTypeToPool[enemyType].Spawn(initEnemyAction).GetComponent<Enemy>();
-				if (enemyComponent == null)
+				try
 				{
-					return;
-				}
-				gameEntity = enemyComponent.transform;
+					enemyComponent = _enemyTypeToPool[enemyType].Spawn(initEnemyAction).GetComponent<Enemy>();
+					if (enemyComponent == null)
+					{
+						return;
+					}
+					gameEntity = enemyComponent.transform;
 	
-				enemies.Add(enemyComponent);
+					enemies.Add(enemyComponent);
+				}
+				catch (Exception e)
+				{
+				}
+				
 				break;
 			}
 			case LevelEditorGameEntityType.Obstacle:

+ 8 - 1
Unity3/Assets/GameCore/LevelManagement/SpawnData.cs

@@ -95,7 +95,14 @@ public class SpawnData : IComparable
 		int index = 0;
 		foreach (DataCodec codec in codecs)
 		{
-			codec.Decode(spawnData.data, ref index);
+			try
+			{
+				codec.Decode(spawnData.data, ref index);
+			}
+			catch (Exception e)
+			{
+			}
+			
 		}
 	}
 	#endregion

+ 9 - 4
Unity3/Assets/GameCore/Managers/VideoManager.cs

@@ -23,7 +23,7 @@ public class VideoManager : MonoBehaviour
         // VideoPlayer automatically targets the camera backplane when it is added
         // to a camera object, no need to change videoPlayer.targetCamera.
         VideoPlayer = camera.AddComponent<UnityEngine.Video.VideoPlayer>();
-        StartCoroutine(playVideo());
+        
 
     }
     void EndReached(UnityEngine.Video.VideoPlayer vp)
@@ -54,7 +54,7 @@ public class VideoManager : MonoBehaviour
     {
         VideoPlayer.Stop();
     }
-    IEnumerator playVideo()
+    IEnumerator playVideo(string strURL)
     {
         //Disable Play on Awake for both Video and Audio
         VideoPlayer.playOnAwake = false;
@@ -72,14 +72,14 @@ public class VideoManager : MonoBehaviour
         VideoPlayer.targetTexture = VideoRenderTexture;
         // Restart from beginning when done.
         VideoPlayer.isLooping = true;
-        VideoPlayer.url = "http://game.gamatic.com/iCTS/Video/APT_smokkarHreyfing.mp4";
+        VideoPlayer.url = strURL;
         //Set video To Play then prepare Audio to prevent Buffering
         VideoPlayer.Prepare();
     
         //Wait until video is prepared
         while (!VideoPlayer.isPrepared)
         {
-            Debug.Log("Preparing Video");
+           // Debug.Log("Preparing Video");
             yield return null;
         }
     
@@ -108,4 +108,9 @@ public class VideoManager : MonoBehaviour
     
         Debug.Log("Done Playing Video");
     }
+
+    public void SetURLVideo(string videoUrl)
+    {
+        StartCoroutine(playVideo(videoUrl));
+    }
 }

+ 0 - 1
Unity3/Assets/GameObjects/CondomDispenser/CondomDispenser.cs

@@ -319,7 +319,6 @@ public class CondomDispenser : Collidable
 			titleRectTransform.DOAnchorPosY(pos.y, 0.04f, false).SetEase(Ease.OutBack).OnComplete(() =>
 			{
 				OniTweenMoveFinished();
-				Debug.Log("Complete");
 			});
 			//AVDebug.Log("CD start moving at tick "+RecordingManager.Ticks);
 			//iTween.MoveTo(gameObject, iTween.Hash(

+ 0 - 5
Unity3/Assets/GameObjects/Enemies/Movement/HorizontalMovement.cs

@@ -30,11 +30,6 @@ public class HorizontalMovement : MovementBase
 		}
 
 		float delta = ((FAKED_SCROLLING_SPEED * ScrollingManager.Instance.CurrentScrollingSpeedFactor) + _speed) * Time.deltaTime;
-		if(transform.name.Contains("Syphilis"))
-        {
-			Debug.Log(transform.localPosition);
-
-		}
 		transform.localPosition += new Vector3(scaleFactor*delta * right.x, delta * right.y);
 	}
 

BIN
Unity3/Assets/Plugins/Android/com.facebook.android.facebook-common-9.1.1.aar


BIN
Unity3/Assets/Plugins/Android/com.facebook.android.facebook-core-9.1.1.aar


+ 16 - 8
Unity3/Assets/SocialNetworking/Scripts/SocialPlatform/GameDatabaseManager.cs

@@ -6,7 +6,7 @@ using System.Security.Cryptography;
 using System.Text;
 using JsonFx;
 using JsonFx.Json;
-#if UNITY_IPHONE
+#if UNITY_IOS
 using UnityEngine.iOS;
 #endif
 
@@ -252,6 +252,12 @@ public class GameDatabaseManager : MonoBehaviour
 
     private void OnCheckDevice(bool arg1, User arg2)
     {
+	    var fbID = PlayerPrefs.GetString("UserID");
+	    if (!string.IsNullOrEmpty(SocialManager.Instance.userID))
+	    {
+		    return;
+	    }
+	    
 		SocialManager.Instance.userID = arg2.id;
 		if(!string.IsNullOrEmpty(SocialManager.Instance.userID))
         {
@@ -308,22 +314,24 @@ public class GameDatabaseManager : MonoBehaviour
 
 	public string GetDevice()
 	{
-		#if UNITY_ANDROID
-		return SystemInfo.deviceUniqueIdentifier.ToString();
-		#endif
+		
 	//KeyChain.BindDeleteKeyChainUser();
 		string result = "";
+		#if UNITY_IOS
+		string saveUUID = KeyChain.BindGetKeyChainUser();
+		#endif
+		#if UNITY_ANDROID
 		string saveUUID = "";
+		result = SystemInfo.deviceUniqueIdentifier;
+		return result;
+		#endif
 		
-#if UNITY_IPHONE
-		KeyChain.BindGetKeyChainUser();
-#endif
 		Debug.Log("BindGetKeyChainUser " + saveUUID);
 		var dev = JsonReader.Deserialize<Device>(saveUUID);
 		Debug.Log("BindGetKeyChainUser " + dev);
 		if (string.IsNullOrEmpty(dev.uuid))
 		{
-#if UNITY_IPHONE
+#if UNITY_IOS
 			KeyChain.BindSetKeyChainUser ("0", SystemInfo.deviceUniqueIdentifier);
 #endif
 			result = SystemInfo.deviceUniqueIdentifier;

+ 5 - 3
Unity3/Assets/SocialNetworking/Scripts/WrapperFB.cs

@@ -29,7 +29,9 @@ public class WrapperFB : MonoBehaviour
     {
         LoginGo = LoginGop;
         LogoutGo = LogoutGop;
-        SocialManager.Instance.userID = ID;
+        var fbID = PlayerPrefs.GetString("UserID");
+        SocialManager.Instance.userID = fbID;
+        Debug.Log("fbID " + fbID);
         /*if (PlayerPrefs.GetInt("Login") == 1)
         {
             LogoutGo.SetActive(false);
@@ -182,7 +184,7 @@ public class WrapperFB : MonoBehaviour
                 PlayerPrefs.SetString("UserID", "");
                 //Name = result.ResultDictionary["first_name"].ToString() + " " + result.ResultDictionary["last_name"].ToString();
                 PlayerPrefs.SetInt("Login",1);
-                if (PlayerPrefs.GetInt("Login") == 1)
+                /*if (PlayerPrefs.GetInt("Login") == 1)
                 {
                     LogoutGo.SetActive(true);
                     LoginGo.SetActive(false);
@@ -191,7 +193,7 @@ public class WrapperFB : MonoBehaviour
                 {
                     LogoutGo.SetActive(false);
                     LoginGo.SetActive(true);
-                }
+                }*/
                 //LoginManager.Instance.WrongMessages.Hide();
                 PlayerPrefs.SetString("FB_USER_NAME", Name);
                 PlayerPrefs.Save();

+ 10 - 2
Unity3/Assets/UI/Buttons/ButtonMenuTransitionEvent.cs

@@ -16,8 +16,10 @@ public class ButtonMenuTransitionEvent : MonoBehaviour
     public bool IsNextLevel;
     public bool IsCloseVirus;
     public bool isResumePause;
+    public bool isNextLevel;
     private void Start()
     {
+        
         GetComponent<Button>().onClick.AddListener(OnClick);
     }
     IEnumerator DalayTimeUpScreen()
@@ -29,6 +31,12 @@ public class ButtonMenuTransitionEvent : MonoBehaviour
 	
 	protected virtual void OnClick()
 	{
+        if (isNextLevel)
+        {
+            PlayerPrefs.SetInt("Level", LevelsManager.Instance.CurrentLevelIndex + 1);
+            PlayerPrefs.Save();
+            
+        }
 	    if (!ConnectivityPollManager.HasInternet)
 	    {
             MenuManager. _instance.scoresScreen.GetComponent<FacebookDialogManager>().noInternetDialog.Show();
@@ -365,8 +373,8 @@ public class ButtonMenuTransitionEvent : MonoBehaviour
                                     NotificationCenter.Post(NotificationType.GameOver);
                                     NotificationCenter.Post(NotificationType.MenuTransition, MenuManager.MenuTransition.ExitToMainMenu);
                                     MenuManager._instance.playScreen.SetActive(false);
-                                    PlayerPrefs.SetInt("Level",1);
-                                    PlayerPrefs.Save();
+                                    //PlayerPrefs.SetInt("Level",1);
+                                    //PlayerPrefs.Save();
                                     LivesManager.Instance.RechargeLife();
                                 }     
 				            }

+ 1 - 1
Unity3/Assets/UI/Buttons/InvisibleButtonForAVFacebookPage.cs

@@ -5,6 +5,6 @@ public class InvisibleButtonForAVFacebookPage : MonoBehaviour
 {
 	void OnClick()
 	{
-		FacebookHelper.Instance.OpenFacebookPage("145693208782632", "http://www.tctech.eu");
+		FacebookHelper.Instance.OpenFacebookPage("145693208782632", "https://www.tctech.eu");
 	}
 }

+ 5 - 6
Unity3/Assets/UI/LevelSelector.cs

@@ -39,20 +39,19 @@ public class LevelSelector : MonoBehaviour
 
 	void ActivateCountButtonLevel()
 	{
-		int playerLevel  = PlayerPrefs.GetInt("Level");
+		int playerLevelDone  = PlayerPrefs.GetInt("LevelDone");
 		
-		if(playerLevel==0)
+		if(playerLevelDone==0)
 		{
-			PlayerPrefs.SetInt("Level", 1);
+			PlayerPrefs.SetInt("LevelDone", 1);
 
 		}
-		playerLevel = PlayerPrefs.GetInt("Level");
 		//Debug.Log(playerLevel);
 		for (int i = 0; i < ButtonLevelSelectors.Count; i++)
 		{
-			if(i>playerLevel-1)
+			if(i>playerLevelDone-1)
 			{
-				ButtonLevelSelectors[i].GetComponent<Button>().interactable = true;
+				ButtonLevelSelectors[i].GetComponent<Button>().interactable = false;
 			}
 			else
 			{

+ 4 - 2
Unity3/Assets/UI/Objectives/GameOverScreenTitle.cs

@@ -27,10 +27,12 @@ public class GameOverScreenTitle : MonoBehaviour
             MenuManager._instance.CouponeMessage.Show();
 	        return;
 	    }
+	    var curLEvel = PlayerPrefs.GetInt("Level");
+	    Debug.Log("Finish Game " + curLEvel);
 		if(MenuManager._instance.Finish)
 		{
 			Debug.Log("Finish " + LevelsManager.Instance.CurrentLevelIndex);
-			title.text = string.Format(Localization.instance.Get("scoreSummary.title.finished"), LevelsManager.Instance.CurrentLevelIndex);
+			title.text = string.Format(Localization.instance.Get("scoreSummary.title.finished"), curLEvel);
 			if (LevelsManager.Instance.CurrentLevelIndex > 2)
 			{
 				if (InventoryManager.Instance.GetItemCount(InventoryItem.specialwave) <= 1)
@@ -52,7 +54,7 @@ public class GameOverScreenTitle : MonoBehaviour
 		}
 		else
 		{
-			title.text = string.Format(Localization.instance.Get("scoreSummary.title.nofinished"), LevelsManager.Instance.CurrentLevelIndex+1);
+			title.text = string.Format(Localization.instance.Get("scoreSummary.title.nofinished"), curLEvel);
 			if (LevelsManager.Instance.CurrentLevelIndex > 2)
 			{
 				if(InventoryManager.Instance.GetItemCount(InventoryItem.specialwave)<=1)

+ 11 - 10
Unity3/Assets/UI/Objectives/ObjectivesDialog.cs

@@ -38,7 +38,7 @@ public class ObjectivesDialog : ScreenBase
 		if(!ScreenPaused)
 		{
 			Title.text = string.Format(Localization.instance.Get("scores.levelGlobalTitle"),
-								   LevelsManager.Instance.CurrentLevelIndex + 1);
+								   LevelsManager.Instance.CurrentLevelIndex+1);
 		}
 		
 	}
@@ -177,6 +177,7 @@ public class ObjectivesDialog : ScreenBase
 						}
 
 						PlayerPrefs.SetInt("Level", curLEvel);
+						PlayerPrefs.Save();
                         Debug.LogError(curLEvel);
 					    //if (curLEvel == 3)
 					    //{
@@ -210,10 +211,10 @@ public class ObjectivesDialog : ScreenBase
 				}
 
 				var curLevel1 = PlayerPrefs.GetInt("Level");
-				if (/*LevelsManager.Instance.CurrentLevelIndex <= curLevel1 - 1 &&*/ LevelsManager.Instance.CurrentLevelIndex + 1 <= 9)
-				{
-					LevelsManager.Instance.CurrentLevelIndex++;
-				}
+				//if (/*LevelsManager.Instance.CurrentLevelIndex <= curLevel1 - 1 &&*/ LevelsManager.Instance.CurrentLevelIndex + 1 <= 9)
+				//{
+				//	LevelsManager.Instance.CurrentLevelIndex++;
+				//}
 				//if (LevelsManager.Instance.CurrentLevelIndex <= curLevel1 - 1 && LevelsManager.Instance.CurrentLevelIndex+1<=5)
 				//{
 				//	LevelsManager.Instance.CurrentLevelIndex++;
@@ -273,7 +274,7 @@ public class ObjectivesDialog : ScreenBase
 
 			curLEvel = curLEvel + 1;
 			Debug.Log(curLEvel);
-			PlayerPrefs.SetInt("Level", curLEvel);
+			//PlayerPrefs.SetInt("Level", curLEvel);
 
 
 			if (curLEvel == 1 || curLEvel == 3 || curLEvel == 6)
@@ -291,12 +292,12 @@ public class ObjectivesDialog : ScreenBase
 		}
 
 		 var curLevel1 = PlayerPrefs.GetInt("Level");
-		 if (LevelsManager.Instance.CurrentLevelIndex <= curLevel1 - 1 && LevelsManager.Instance.CurrentLevelIndex<5)
-		{
-			LevelsManager.Instance.CurrentLevelIndex++;
+		 //if (LevelsManager.Instance.CurrentLevelIndex <= curLevel1 - 1 && LevelsManager.Instance.CurrentLevelIndex<5)
+		//{
+		//	LevelsManager.Instance.CurrentLevelIndex++;
 			//
 
-		}
+		//}
 	}
 
 	public void UpdateObjectivesStateForPauseScreen()

+ 14 - 1
Unity3/Assets/UI/Screens/ChangeLoginPopup.cs

@@ -4,10 +4,23 @@ using UnityEngine;
 
 public class ChangeLoginPopup : ScreenBase
 {
+    public GameObject ParentAndroid;
+    public GameObject ParentIos;
     // Start is called before the first frame update
     void Start()
     {
-        
+        #if UNITY_ANDROID
+        ParentAndroid.SetActive(true);
+        #endif
+        #if UNITY_IOS
+        ParentIos.SetActive(true);
+        #endif
+        if (PlayerPrefs.GetInt("ErrorLogin") == 0)
+        {
+            PlayerPrefs.DeleteAll();
+            PlayerPrefs.SetInt("ErrorLogin",1);
+            PlayerPrefs.Save();
+        }
     }
 
     // Update is called once per frame

+ 1 - 1
Unity3/Assets/UI/Screens/DownloadImageFromServer.cs

@@ -138,7 +138,7 @@ public class DownloadImageFromServer : MonoBehaviour
 
                 if (string.IsNullOrEmpty(www.error))
                 {
-                    var str = "http://game.gamatic.com/iCTS/BannerAD/";
+                    var str = "https://game.gamatic.com/iCTS/BannerAD/";
                     var conf = PlaceholderUrl.Substring(str.ToCharArray().Length);
                     if (conf.Contains("OLD"))
                     {

+ 1 - 3
Unity3/Assets/UI/Screens/DownloadVideoFromServer.cs

@@ -102,7 +102,6 @@ public class DownloadVideoFromServer : MonoBehaviour
             }
             else
             {
-                Debug.LogError("!!");
                 Debug.LogError("Banner:[" + www.error + "|" + www.url + "]");
                 parent.State = States.LoadFailed;
                 Broken = true;
@@ -114,7 +113,6 @@ public class DownloadVideoFromServer : MonoBehaviour
 
                 if (string.IsNullOrEmpty(www.error))
                 {
-                    Debug.LogError("!");
                     DownloadVideoFromServer.Instance.listVideoBanner.Add(www.url);
                     parent.State = States.HasVideo;
                 }
@@ -174,6 +172,7 @@ public class DownloadVideoFromServer : MonoBehaviour
             }
             State = States.ConfigLoadDone;
             AddAddToList();
+            VideoManager.Instance.SetURLVideo(_configs[0].VideoUrl);
             RequesNextAd();
         }
         else
@@ -211,7 +210,6 @@ public class DownloadVideoFromServer : MonoBehaviour
         }
         else
         {
-         Debug.Log("!!!!!!!!!!!!!!!");
             _configs = new List<ConfigUnit>();
             Instance = this;
             StartCoroutine(LoadConfig());

+ 7 - 4
Unity3/Assets/Unity Technologies/SignInWithApple/Samples/Scripts/SignInWithAppleTest_Callbacks.cs

@@ -1,16 +1,19 @@
 using System;
 using Facebook.Unity.Example;
 using UnityEngine;
-#if UNITY_IPHONE
-using UnityEngine.iOS;
-
+#if UNITY_IOS
+    using UnityEngine.iOS;
 using UnityEngine.SignInWithApple;
 #endif
 
+
+
+
+
 public class SignInWithAppleTest_Callbacks : MonoBehaviour
 {
     private string userId;
-#if UNITY_IPHONE
+#if UNITY_IOS
     public void ButtonPress()
     {