game end screen l10 fix
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -8730,16 +8730,13 @@ MonoBehaviour:
|
|||||||
redGoalEffects:
|
redGoalEffects:
|
||||||
- {fileID: 1207099707}
|
- {fileID: 1207099707}
|
||||||
- {fileID: 1826642063}
|
- {fileID: 1826642063}
|
||||||
- {fileID: 348182973}
|
- {fileID: 6517165855333884865}
|
||||||
blueGoalEffects:
|
blueGoalEffects:
|
||||||
- {fileID: 2754783705440688386}
|
- {fileID: 2754783705440688386}
|
||||||
- {fileID: 1510554619}
|
- {fileID: 1510554619}
|
||||||
- {fileID: 6517165855333884865}
|
- {fileID: 348182973}
|
||||||
redScoreText: {fileID: 689409415}
|
redScoreText: {fileID: 689409415}
|
||||||
blueScoreText: {fileID: 215557299}
|
blueScoreText: {fileID: 215557299}
|
||||||
gameOverPanel: {fileID: 976909848}
|
|
||||||
blueWon: {fileID: 2114154720}
|
|
||||||
redWon: {fileID: 867463508}
|
|
||||||
blueTimerGroup: {fileID: 2028496749}
|
blueTimerGroup: {fileID: 2028496749}
|
||||||
redTimerGroup: {fileID: 1693353735}
|
redTimerGroup: {fileID: 1693353735}
|
||||||
minFlashSpeed: 5
|
minFlashSpeed: 5
|
||||||
|
|||||||
+1
-3695
File diff suppressed because it is too large
Load Diff
@@ -603,7 +603,62 @@ public class GameManager : NetworkBehaviour
|
|||||||
|
|
||||||
IEnumerator CoroutineGameOver(Team team){
|
IEnumerator CoroutineGameOver(Team team){
|
||||||
yield return new WaitForSeconds(2f);
|
yield return new WaitForSeconds(2f);
|
||||||
|
yield return CoroutineFetchBothPlayersL10();
|
||||||
LevelLoadManager.instance.SetupGameOver(team,redScore,blueScore);
|
LevelLoadManager.instance.SetupGameOver(team,redScore,blueScore);
|
||||||
|
LevelLoadManager.LoadLevel("MainMenu");
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator CoroutineFetchBothPlayersL10()
|
||||||
|
{
|
||||||
|
var my = LevelLoadManager.myPlayer;
|
||||||
|
var opp = LevelLoadManager.opponentPlayer;
|
||||||
|
if (my == null || opp == null)
|
||||||
|
yield break;
|
||||||
|
|
||||||
|
string baseUrl = (DedicatedInternalApiBase ?? "").TrimEnd('/');
|
||||||
|
if (string.IsNullOrEmpty(baseUrl))
|
||||||
|
yield break;
|
||||||
|
|
||||||
|
if (my.UserId > 0){
|
||||||
|
yield return CoFetchPlayerL10Apply(baseUrl, my);
|
||||||
|
}
|
||||||
|
if (opp.UserId > 0 && opp.UserId != my.UserId){
|
||||||
|
yield return CoFetchPlayerL10Apply(baseUrl, opp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
LevelLoadManager.myPlayer = my;
|
||||||
|
LevelLoadManager.opponentPlayer = opp;
|
||||||
|
}
|
||||||
|
|
||||||
|
static IEnumerator CoFetchPlayerL10Apply(string baseUrl, MatchmadePlayer player)
|
||||||
|
{
|
||||||
|
string url = baseUrl + "/players/" + player.UserId + "/l10";
|
||||||
|
using (var req = UnityWebRequest.Get(url))
|
||||||
|
{
|
||||||
|
yield return req.SendWebRequest();
|
||||||
|
if (req.result != UnityWebRequest.Result.Success)
|
||||||
|
{
|
||||||
|
Logger.Log("Player L10 fetch failed: " + req.error + " " + url);
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
|
||||||
|
var resp = JsonUtility.FromJson<PlayerL10Response>(req.downloadHandler.text);
|
||||||
|
if (resp != null && resp.ok)
|
||||||
|
{
|
||||||
|
player.l10_wins = resp.l10_wins;
|
||||||
|
player.l10_losses = resp.l10_losses;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
|
class PlayerL10Response
|
||||||
|
{
|
||||||
|
public bool ok;
|
||||||
|
public int player_id;
|
||||||
|
public int l10_wins;
|
||||||
|
public int l10_losses;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool freezeInput = false;
|
bool freezeInput = false;
|
||||||
|
|||||||
@@ -115,8 +115,8 @@ public class LevelLoadManager : MonoBehaviour
|
|||||||
p2_l10.text = opponentL10;
|
p2_l10.text = opponentL10;
|
||||||
}
|
}
|
||||||
|
|
||||||
MatchmadePlayer myPlayer;
|
public static MatchmadePlayer myPlayer;
|
||||||
MatchmadePlayer opponentPlayer;
|
public static MatchmadePlayer opponentPlayer;
|
||||||
|
|
||||||
public void SetupMatchMade(Team myTeam_, MatchmadePlayer myPlayer_, MatchmadePlayer opponentPlayer_){
|
public void SetupMatchMade(Team myTeam_, MatchmadePlayer myPlayer_, MatchmadePlayer opponentPlayer_){
|
||||||
myTeam = myTeam_;
|
myTeam = myTeam_;
|
||||||
@@ -140,21 +140,9 @@ public class LevelLoadManager : MonoBehaviour
|
|||||||
if(myTeam == winningTeam){
|
if(myTeam == winningTeam){
|
||||||
p1_winner.SetActive(true);
|
p1_winner.SetActive(true);
|
||||||
p2_winner.SetActive(false);
|
p2_winner.SetActive(false);
|
||||||
|
|
||||||
myPlayer.l10_wins++;
|
|
||||||
myPlayer.l10_losses--;
|
|
||||||
|
|
||||||
opponentPlayer.l10_losses++;
|
|
||||||
opponentPlayer.l10_wins--;
|
|
||||||
}else{
|
}else{
|
||||||
p1_winner.SetActive(false);
|
p1_winner.SetActive(false);
|
||||||
p2_winner.SetActive(true);
|
p2_winner.SetActive(true);
|
||||||
|
|
||||||
opponentPlayer.l10_wins++;
|
|
||||||
opponentPlayer.l10_losses--;
|
|
||||||
|
|
||||||
myPlayer.l10_losses++;
|
|
||||||
myPlayer.l10_wins--;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p1_l10.text = $"L10 {myPlayer.l10_wins}-{myPlayer.l10_losses}";
|
p1_l10.text = $"L10 {myPlayer.l10_wins}-{myPlayer.l10_losses}";
|
||||||
|
|||||||
+39
-29
@@ -1,30 +1,40 @@
|
|||||||
Logger initiated at 4/4/2026 11:59:58 PM
|
Logger initiated at 4/5/2026 9:39:57 PM
|
||||||
|
|
||||||
[4/4/2026 11:59:58 PM] Error retreiving settings from server JSON parse error: The document root must not follow by other values.
|
[4/5/2026 9:39:57 PM] Error retreiving settings from server JSON parse error: The document root must not follow by other values.
|
||||||
[4/4/2026 11:59:58 PM] 403 Unauthorized
|
[4/5/2026 9:39:57 PM] 403 Unauthorized
|
||||||
[4/5/2026 12:00:29 AM] Starting matchmake as warlock
|
[4/5/2026 9:40:02 PM] Starting matchmake as warlock
|
||||||
[4/5/2026 12:00:39 AM] Got into a room
|
[4/5/2026 9:40:06 PM] Got into a room
|
||||||
[4/5/2026 12:00:39 AM] {"Players":[{"Name":"warlock","LastSeen":1775327439036,"UserId":4,"l10_wins":0,"l10_losses":1}],"GameName":"soccar","Port":26987,"InitTime":1775327439036,"match_id":16,"your_team":"red"}
|
[4/5/2026 9:40:06 PM] {"Players":[{"Name":"warlock","LastSeen":1775405406006,"UserId":4,"l10_wins":2,"l10_losses":2}],"GameName":"soccar","Port":26379,"InitTime":1775405406006,"match_id":21,"your_team":"red"}
|
||||||
[4/5/2026 12:00:40 AM] Got into a room
|
[4/5/2026 9:40:07 PM] Got into a room
|
||||||
[4/5/2026 12:00:40 AM] {"Players":[{"Name":"warlock","LastSeen":1775327439036,"UserId":4,"l10_wins":0,"l10_losses":1}],"GameName":"soccar","Port":26987,"InitTime":1775327439036,"match_id":16,"your_team":"red"}
|
[4/5/2026 9:40:07 PM] {"Players":[{"Name":"warlock","LastSeen":1775405406006,"UserId":4,"l10_wins":2,"l10_losses":2}],"GameName":"soccar","Port":26379,"InitTime":1775405406006,"match_id":21,"your_team":"red"}
|
||||||
[4/5/2026 12:00:41 AM] Got into a room
|
[4/5/2026 9:40:08 PM] Got into a room
|
||||||
[4/5/2026 12:00:41 AM] {"Players":[{"Name":"warlock","LastSeen":1775327439036,"UserId":4,"l10_wins":0,"l10_losses":1}],"GameName":"soccar","Port":26987,"InitTime":1775327439036,"match_id":16,"your_team":"red"}
|
[4/5/2026 9:40:08 PM] {"Players":[{"Name":"warlock","LastSeen":1775405406006,"UserId":4,"l10_wins":2,"l10_losses":2}],"GameName":"soccar","Port":26379,"InitTime":1775405406006,"match_id":21,"your_team":"red"}
|
||||||
[4/5/2026 12:00:46 AM] Got into a room
|
[4/5/2026 9:40:10 PM] Got into a room
|
||||||
[4/5/2026 12:00:46 AM] {"Players":[{"Name":"warlock","LastSeen":1775327439036,"UserId":4,"l10_wins":0,"l10_losses":1},{"Name":"warlock2","LastSeen":1775327443636,"UserId":5,"l10_wins":1,"l10_losses":0}],"GameName":"soccar","Port":26987,"InitTime":1775327439036,"match_id":16,"your_team":"red"}
|
[4/5/2026 9:40:10 PM] {"Players":[{"Name":"warlock","LastSeen":1775405406006,"UserId":4,"l10_wins":2,"l10_losses":2}],"GameName":"soccar","Port":26379,"InitTime":1775405406006,"match_id":21,"your_team":"red"}
|
||||||
[4/5/2026 12:00:46 AM] Configured dedicated match reporting for match id 16 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base http://vps.playpoolstudios.com:2612
|
[4/5/2026 9:40:11 PM] Got into a room
|
||||||
[4/5/2026 12:00:46 AM] Setting cupid to load game scene
|
[4/5/2026 9:40:11 PM] {"Players":[{"Name":"warlock","LastSeen":1775405406006,"UserId":4,"l10_wins":2,"l10_losses":2}],"GameName":"soccar","Port":26379,"InitTime":1775405406006,"match_id":21,"your_team":"red"}
|
||||||
[4/5/2026 12:00:46 AM] Loading game scene
|
[4/5/2026 9:40:12 PM] Got into a room
|
||||||
[4/5/2026 12:00:50 AM] Starting client at $vps.playpoolstudios.com:26987
|
[4/5/2026 9:40:12 PM] {"Players":[{"Name":"warlock","LastSeen":1775405406006,"UserId":4,"l10_wins":2,"l10_losses":2}],"GameName":"soccar","Port":26379,"InitTime":1775405406006,"match_id":21,"your_team":"red"}
|
||||||
[4/5/2026 12:01:09 AM] Selected team changed from Red to Blue
|
[4/5/2026 9:40:13 PM] Got into a room
|
||||||
[4/5/2026 12:01:15 AM] Selected team changed from Blue to Red
|
[4/5/2026 9:40:13 PM] {"Players":[{"Name":"warlock","LastSeen":1775405406006,"UserId":4,"l10_wins":2,"l10_losses":2}],"GameName":"soccar","Port":26379,"InitTime":1775405406006,"match_id":21,"your_team":"red"}
|
||||||
[4/5/2026 12:01:20 AM] Selected team changed from Red to Blue
|
[4/5/2026 9:40:15 PM] Got into a room
|
||||||
[4/5/2026 12:01:26 AM] Selected team changed from Blue to Red
|
[4/5/2026 9:40:15 PM] {"Players":[{"Name":"warlock","LastSeen":1775405406006,"UserId":4,"l10_wins":2,"l10_losses":2},{"Name":"warlock2","LastSeen":1775405414767,"UserId":5,"l10_wins":2,"l10_losses":2}],"GameName":"soccar","Port":26379,"InitTime":1775405406006,"match_id":21,"your_team":"red"}
|
||||||
[4/5/2026 12:01:31 AM] Selected team changed from Red to Blue
|
[4/5/2026 9:40:15 PM] Configured dedicated match reporting for match id 21 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base http://vps.playpoolstudios.com:2612
|
||||||
[4/5/2026 12:01:38 AM] Selected team changed from Blue to Red
|
[4/5/2026 9:40:15 PM] Setting cupid to load game scene
|
||||||
[4/5/2026 12:01:44 AM] Selected team changed from Red to Blue
|
[4/5/2026 9:40:15 PM] Loading game scene
|
||||||
[4/5/2026 12:01:50 AM] Selected team changed from Blue to Red
|
[4/5/2026 9:40:19 PM] Starting client at $vps.playpoolstudios.com:26379
|
||||||
[4/5/2026 12:02:01 AM] Selected team changed from Red to Blue
|
[4/5/2026 9:40:26 PM] Selected team changed from Red to Blue
|
||||||
[4/5/2026 12:02:08 AM] Selected team changed from Blue to Red
|
[4/5/2026 9:40:31 PM] Score changed from 0 to 1
|
||||||
[4/5/2026 12:02:12 AM] Selected team changed from Red to Blue
|
[4/5/2026 9:40:39 PM] Selected team changed from Blue to Red
|
||||||
[4/5/2026 12:02:15 AM] Selected team changed from Blue to Red
|
[4/5/2026 9:40:52 PM] Selected team changed from Red to Blue
|
||||||
[4/5/2026 12:02:18 AM] Score changed from 0 to 1
|
[4/5/2026 9:40:54 PM] Score changed from 0 to 1
|
||||||
|
[4/5/2026 9:41:03 PM] Selected team changed from Blue to Red
|
||||||
|
[4/5/2026 9:41:09 PM] Selected team changed from Red to Blue
|
||||||
|
[4/5/2026 9:41:11 PM] Score changed from 1 to 2
|
||||||
|
[4/5/2026 9:41:19 PM] Selected team changed from Blue to Red
|
||||||
|
[4/5/2026 9:41:31 PM] Selected team changed from Red to Blue
|
||||||
|
[4/5/2026 9:41:35 PM] Selected team changed from Blue to Red
|
||||||
|
[4/5/2026 9:41:44 PM] Selected team changed from Red to Blue
|
||||||
|
[4/5/2026 9:41:50 PM] Score changed from 2 to 3
|
||||||
|
[4/5/2026 9:41:57 PM] Error retreiving settings from server JSON parse error: The document root must not follow by other values.
|
||||||
|
[4/5/2026 9:41:57 PM] 403 Unauthorized
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ PlayerSettings:
|
|||||||
androidApplicationEntry: 2
|
androidApplicationEntry: 2
|
||||||
defaultIsNativeResolution: 1
|
defaultIsNativeResolution: 1
|
||||||
macRetinaSupport: 1
|
macRetinaSupport: 1
|
||||||
runInBackground: 0
|
runInBackground: 1
|
||||||
muteOtherAudioSources: 0
|
muteOtherAudioSources: 0
|
||||||
Prepare IOS For Recording: 0
|
Prepare IOS For Recording: 0
|
||||||
Force IOS Speakers When Recording: 0
|
Force IOS Speakers When Recording: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user