Răsfoiți Sursa

gameId => GameId constant

Axel Nordh 5 ani în urmă
părinte
comite
a9ee1d5586

+ 1 - 1
Assets/Prefab/NEWAnswerlineQuestion.prefab

@@ -161,7 +161,7 @@ MonoBehaviour:
     m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
     m_FontSize: 14
     m_FontStyle: 0
-    m_BestFit: 0
+    m_BestFit: 1
     m_MinSize: 10
     m_MaxSize: 40
     m_Alignment: 4

+ 5 - 0
Assets/Scenes/MainMenu.unity

@@ -6738,5 +6738,10 @@ PrefabInstance:
       propertyPath: backButtonVisible
       value: 0
       objectReference: {fileID: 0}
+    - target: {fileID: 6032201715164675895, guid: c2ef781d224545542bbff67376813712,
+        type: 3}
+      propertyPath: signedInPlayerVisible
+      value: 1
+      objectReference: {fileID: 0}
     m_RemovedComponents: []
   m_SourcePrefab: {fileID: 100100000, guid: c2ef781d224545542bbff67376813712, type: 3}

+ 1 - 1
Assets/Scenes/narKampen.unity

@@ -4023,7 +4023,7 @@ MonoBehaviour:
     m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
     m_FontSize: 14
     m_FontStyle: 0
-    m_BestFit: 0
+    m_BestFit: 1
     m_MinSize: 10
     m_MaxSize: 40
     m_Alignment: 4

+ 4 - 4
Assets/Scripts/Login/Login.cs

@@ -16,8 +16,8 @@ public class Login : MonoBehaviour {
     public InputField usernameInputField;
     public InputField passwordInputField;
 
-    [SerializeField] Button swedishLangButton;
-    [SerializeField] Button englishLangButton;
+    //[SerializeField] Button swedishLangButton;
+    // [SerializeField] Button englishLangButton;
     public Button loginButton;
     public Toggle keepSignedIn;
 
@@ -45,8 +45,8 @@ public class Login : MonoBehaviour {
         loginButton.onClick.AddListener(loginAction);
         errorColor = errorText.color;
         system = EventSystem.current;
-        swedishLangButton.onClick.AddListener(() => SwitchLanguage(0));
-        englishLangButton.onClick.AddListener(() => SwitchLanguage(1));
+/*        swedishLangButton.onClick.AddListener(() => SwitchLanguage(0));
+        englishLangButton.onClick.AddListener(() => SwitchLanguage(1));*/ 
     }
 
     private void Awake() {

+ 2 - 0
Assets/Sprites/ByFreepik.jpg.meta

@@ -26,6 +26,7 @@ TextureImporter:
   isReadable: 0
   streamingMipmaps: 0
   streamingMipmapsPriority: 0
+  vTOnly: 0
   grayScaleToAlpha: 0
   generateCubemap: 6
   cubemapConvolution: 0
@@ -60,6 +61,7 @@ TextureImporter:
   maxTextureSizeSet: 0
   compressionQualitySet: 0
   textureFormatSet: 0
+  ignorePngGamma: 0
   applyGammaDecoding: 0
   platformSettings:
   - serializedVersion: 3

BIN
Assets/narKampenLocal.db


+ 2 - 2
dbFiles/Categories.php

@@ -11,7 +11,7 @@
 	}
 	mysqli_set_charset($conn,'utf8');
 		
-	$gameId = $_POST['gameId'];
+	$gameId = $_POST['GameId'];
 
 	$categoryFilter = "";
 	if ($gameId == -1) {
@@ -36,7 +36,7 @@
 		echo json_encode($returnArray);
 		
 	} else {
-		echo "ERROR - No Categories found";
+		echo "ERROR - No Categories found by sql " . $sql;
 	}
 	$conn->close();
 	

+ 1 - 1
dbFiles/FirebaseCaller.php

@@ -22,7 +22,7 @@
 	$messageType = $conn->real_escape_string(isset($_POST['type'])?$_POST['type']:"");
 	$title = $conn->real_escape_string($_POST['title']);
 	$messageToSend = $_POST['message'];
-	$gameId = $conn->real_escape_string($_POST['gameId']);
+	$gameId = $conn->real_escape_string($_POST['GameId']);
 
 	if ($messageType === "FCMNextPlayer") {
 		$playerName = $conn->real_escape_string($_POST['playerName']);

+ 2 - 1
dbFiles/NewOnlineGame.php

@@ -20,6 +20,7 @@
 	$categoryIds = $_POST['categoryIds'];
 	
 	$playerIdsArray = explode(",",$playerIds);
+	shuffle($playerIdsArray);
 	$playerCount = count($playerIdsArray);
 	if ($playerCount == 1) {
 		$status = "STARTED";
@@ -43,7 +44,7 @@
 			"$limitPerQuestion, " .
 			"$limitPerPlayer, " .
 			"$playerCount, " .
-			"(SELECT id FROM users WHERE id IN ($playerIds) ORDER BY RAND() LIMIT 1), " .
+			$playerIdsArray[0] . ", " .
 			"1, " .
 			"NOW())";
 	

+ 1 - 1
dbFiles/OnlineGameInfo.php

@@ -10,7 +10,7 @@
 	}
 	mysqli_set_charset($conn,'utf8');
 	
-	$gameId = $conn->real_escape_string($_POST['gameId']);
+	$gameId = $conn->real_escape_string($_POST['GameId']);
 	$callFunction = $conn->real_escape_string($_POST['f']);
 	
 	if ($callFunction === "GetGameInfo") {

+ 1 - 1
dbFiles/OnlineGames.php

@@ -13,7 +13,7 @@
 	
 	$userId = $conn->real_escape_string(isset($_POST['userId'])?$_POST['userId']:"");
 	$callFunction = $conn->real_escape_string(isset($_POST['f'])?$_POST['f']:"");
-	$gameId = $conn->real_escape_string(isset($_POST['gameId'])?$_POST['gameId']:"");
+	$gameId = $conn->real_escape_string(isset($_POST['GameId'])?$_POST['GameId']:"");
 	$userName = $conn->real_escape_string(isset($_POST['userName'])?$_POST['userName']:"");
 	$userId = $conn->query("SELECT id FROM users where username = '$userName'")->fetch_assoc()['id'];