test week rc
This commit is contained in:
+24
-40
@@ -1,41 +1,25 @@
|
|||||||
Logger initiated at 5/27/2026 11:22:24 PM
|
Logger initiated at 5/29/2026 9:58:40 AM
|
||||||
|
|
||||||
[5/27/2026 11:22:24 PM] Cupid settings updated
|
[5/29/2026 9:58:40 AM] Cupid settings updated
|
||||||
[5/27/2026 11:22:25 PM] Cupid settings updated
|
[5/29/2026 9:58:40 AM] Cupid settings updated
|
||||||
[5/27/2026 11:22:27 PM] Starting matchmake as warlock2
|
[5/29/2026 9:58:41 AM] Starting matchmake as warlock
|
||||||
[5/27/2026 11:22:27 PM] Starting matchmake as warlock
|
[5/29/2026 9:58:44 AM] Got into a room
|
||||||
[5/27/2026 11:22:29 PM] Still waiting: {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock2","LastSeen":1779904349877,"UserId":3,"l10_wins":3,"l10_losses":5}],"GameName":"soccar","Port":26958,"InitTime":1779904349877,"entry_fee":21,"match_id":118,"rc_prize":34,"your_team":"red"},"for_blue":null}
|
[5/29/2026 9:58:44 AM] {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock2","LastSeen":1780028923470,"UserId":3,"l10_wins":5,"l10_losses":3},{"Name":"warlock","LastSeen":1780028923874,"UserId":2,"l10_wins":3,"l10_losses":6}],"GameName":"soccar","Port":26438,"InitTime":1780028923470,"entry_fee":21,"match_id":128,"instance_started":true,"rc_prize":34,"your_team":"red"},"for_blue":{"Players":[{"Name":"warlock2","LastSeen":1780028923470,"UserId":3,"l10_wins":5,"l10_losses":3},{"Name":"warlock","LastSeen":1780028923874,"UserId":2,"l10_wins":3,"l10_losses":6}],"GameName":"soccar","Port":26438,"InitTime":1780028923470,"entry_fee":21,"match_id":128,"instance_started":true,"rc_prize":34,"your_team":"blue"}}
|
||||||
[5/27/2026 11:22:30 PM] Got into a room
|
[5/29/2026 9:58:44 AM] Configured dedicated match reporting for match id 128 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
|
||||||
[5/27/2026 11:22:30 PM] {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock2","LastSeen":1779904349877,"UserId":3,"l10_wins":3,"l10_losses":5},{"Name":"warlock","LastSeen":1779904350254,"UserId":2,"l10_wins":4,"l10_losses":2}],"GameName":"soccar","Port":26958,"InitTime":1779904349877,"entry_fee":21,"match_id":118,"instance_started":true,"rc_prize":34,"your_team":"red"},"for_blue":{"Players":[{"Name":"warlock2","LastSeen":1779904349877,"UserId":3,"l10_wins":3,"l10_losses":5},{"Name":"warlock","LastSeen":1779904350254,"UserId":2,"l10_wins":4,"l10_losses":2}],"GameName":"soccar","Port":26958,"InitTime":1779904349877,"entry_fee":21,"match_id":118,"instance_started":true,"rc_prize":34,"your_team":"blue"}}
|
[5/29/2026 9:58:44 AM] Setting cupid to load game scene
|
||||||
[5/27/2026 11:22:30 PM] Configured dedicated match reporting for match id 118 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
|
[5/29/2026 9:58:44 AM] Loading game scene
|
||||||
[5/27/2026 11:22:30 PM] Setting cupid to load game scene
|
[5/29/2026 9:58:48 AM] Starting client at $kickkingsapi.playpoolstudios.com:26438
|
||||||
[5/27/2026 11:22:30 PM] Loading game scene
|
[5/29/2026 9:58:48 AM] Client connected
|
||||||
[5/27/2026 11:22:31 PM] Got into a room
|
[5/29/2026 9:58:55 AM] Selected team changed from Red to Blue
|
||||||
[5/27/2026 11:22:31 PM] {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock2","LastSeen":1779904351324,"UserId":3,"l10_wins":3,"l10_losses":5},{"Name":"warlock","LastSeen":1779904350254,"UserId":2,"l10_wins":4,"l10_losses":2}],"GameName":"soccar","Port":26958,"InitTime":1779904349877,"entry_fee":21,"match_id":118,"instance_started":true,"rc_prize":34,"your_team":"red"},"for_blue":{"Players":[{"Name":"warlock2","LastSeen":1779904351324,"UserId":3,"l10_wins":3,"l10_losses":5},{"Name":"warlock","LastSeen":1779904350254,"UserId":2,"l10_wins":4,"l10_losses":2}],"GameName":"soccar","Port":26958,"InitTime":1779904349877,"entry_fee":21,"match_id":118,"instance_started":true,"rc_prize":34,"your_team":"blue"}}
|
[5/29/2026 9:58:58 AM] Score changed from 0 to 1
|
||||||
[5/27/2026 11:22:31 PM] Configured dedicated match reporting for match id 118 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
|
[5/29/2026 9:59:01 AM] Selected team changed from Blue to Red
|
||||||
[5/27/2026 11:22:31 PM] Setting cupid to load game scene
|
[5/29/2026 9:59:07 AM] Selected team changed from Red to Blue
|
||||||
[5/27/2026 11:22:31 PM] Loading game scene
|
[5/29/2026 9:59:09 AM] Score changed from 1 to 2
|
||||||
[5/27/2026 11:22:35 PM] Starting client at $kickkingsapi.playpoolstudios.com:26958
|
[5/29/2026 9:59:12 AM] Selected team changed from Blue to Red
|
||||||
[5/27/2026 11:22:35 PM] Client connected
|
[5/29/2026 9:59:15 AM] Selected team changed from Red to Blue
|
||||||
[5/27/2026 11:22:36 PM] Starting client at $kickkingsapi.playpoolstudios.com:26958
|
[5/29/2026 9:59:17 AM] Score changed from 2 to 3
|
||||||
[5/27/2026 11:22:36 PM] Client connected
|
[5/29/2026 9:59:29 AM] Configured dedicated match reporting for match id 129 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
|
||||||
[5/27/2026 11:22:43 PM] Selected team changed from Red to Blue
|
[5/29/2026 9:59:29 AM] Client disconnected
|
||||||
[5/27/2026 11:22:43 PM] Selected team changed from Red to Blue
|
[5/29/2026 9:59:33 AM] Starting client at $kickkingsapi.playpoolstudios.com:26658
|
||||||
[5/27/2026 11:22:47 PM] Selected team changed from Blue to Red
|
[5/29/2026 9:59:34 AM] Client connected
|
||||||
[5/27/2026 11:22:47 PM] Score changed from 0 to 1
|
[5/29/2026 9:59:54 AM] Client disconnected
|
||||||
[5/27/2026 11:22:47 PM] Selected team changed from Blue to Red
|
|
||||||
[5/27/2026 11:22:47 PM] Score changed from 0 to 1
|
|
||||||
[5/27/2026 11:22:50 PM] Selected team changed from Red to Blue
|
|
||||||
[5/27/2026 11:22:50 PM] Selected team changed from Red to Blue
|
|
||||||
[5/27/2026 11:22:56 PM] Selected team changed from Blue to Red
|
|
||||||
[5/27/2026 11:22:56 PM] Selected team changed from Blue to Red
|
|
||||||
[5/27/2026 11:22:58 PM] Score changed from 1 to 2
|
|
||||||
[5/27/2026 11:22:58 PM] Score changed from 1 to 2
|
|
||||||
[5/27/2026 11:23:01 PM] Selected team changed from Red to Blue
|
|
||||||
[5/27/2026 11:23:01 PM] Selected team changed from Red to Blue
|
|
||||||
[5/27/2026 11:23:06 PM] Selected team changed from Blue to Red
|
|
||||||
[5/27/2026 11:23:06 PM] Selected team changed from Blue to Red
|
|
||||||
[5/27/2026 11:23:08 PM] Score changed from 2 to 3
|
|
||||||
[5/27/2026 11:23:08 PM] Score changed from 2 to 3
|
|
||||||
[5/27/2026 11:23:59 PM] Client disconnected
|
|
||||||
[5/27/2026 11:24:01 PM] Client disconnected
|
|
||||||
|
|||||||
+13
-11
@@ -623,7 +623,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &23164711
|
--- !u!224 &23164711
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -690,9 +690,9 @@ CanvasGroup:
|
|||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 23164710}
|
m_GameObject: {fileID: 23164710}
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_Alpha: 1
|
m_Alpha: 0
|
||||||
m_Interactable: 1
|
m_Interactable: 0
|
||||||
m_BlocksRaycasts: 1
|
m_BlocksRaycasts: 0
|
||||||
m_IgnoreParentGroups: 0
|
m_IgnoreParentGroups: 0
|
||||||
--- !u!1 &30708564
|
--- !u!1 &30708564
|
||||||
GameObject:
|
GameObject:
|
||||||
@@ -4339,7 +4339,7 @@ MonoBehaviour:
|
|||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
m_PersistentCalls:
|
m_PersistentCalls:
|
||||||
m_Calls: []
|
m_Calls: []
|
||||||
m_Sprite: {fileID: 21300000, guid: afcc176abfdaa9945bc300d4ecfa0e71, type: 3}
|
m_Sprite: {fileID: 21300000, guid: 7b4541dccf68a5a479d7bc41c620fae2, type: 3}
|
||||||
m_Type: 0
|
m_Type: 0
|
||||||
m_PreserveAspect: 0
|
m_PreserveAspect: 0
|
||||||
m_FillCenter: 1
|
m_FillCenter: 1
|
||||||
@@ -4554,7 +4554,7 @@ MonoBehaviour:
|
|||||||
preview: 0
|
preview: 0
|
||||||
isPlaying: 1
|
isPlaying: 1
|
||||||
loop: 1
|
loop: 1
|
||||||
currentFrame: 171
|
currentFrame: 89
|
||||||
--- !u!1 &239916595
|
--- !u!1 &239916595
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -14797,8 +14797,8 @@ RectTransform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1197229754}
|
m_Father: {fileID: 1197229754}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.34615386, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0.34615386, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 56.37, y: 0}
|
m_SizeDelta: {x: 56.37, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
@@ -18232,7 +18232,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &1506964489
|
--- !u!224 &1506964489
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -20895,6 +20895,7 @@ MonoBehaviour:
|
|||||||
- {fileID: 81707918}
|
- {fileID: 81707918}
|
||||||
- {fileID: 945131285}
|
- {fileID: 945131285}
|
||||||
- {fileID: 1744675599}
|
- {fileID: 1744675599}
|
||||||
|
- {fileID: 1506964489}
|
||||||
p1_name: {fileID: 60724007}
|
p1_name: {fileID: 60724007}
|
||||||
p1_l10: {fileID: 1994269188}
|
p1_l10: {fileID: 1994269188}
|
||||||
p2_name: {fileID: 1155938936}
|
p2_name: {fileID: 1155938936}
|
||||||
@@ -20917,6 +20918,7 @@ MonoBehaviour:
|
|||||||
txtRewardCC: {fileID: 30708566}
|
txtRewardCC: {fileID: 30708566}
|
||||||
countdownTxt: {fileID: 2054440054}
|
countdownTxt: {fileID: 2054440054}
|
||||||
returnToMenuCountdown: 25
|
returnToMenuCountdown: 25
|
||||||
|
txtRcBalance: {fileID: 420458116}
|
||||||
txtBetLimitWarning: {fileID: 1506964490}
|
txtBetLimitWarning: {fileID: 1506964490}
|
||||||
betLimitAdjustPanel: {fileID: 1207271335}
|
betLimitAdjustPanel: {fileID: 1207271335}
|
||||||
betLimitSlider: {fileID: 1932867096}
|
betLimitSlider: {fileID: 1932867096}
|
||||||
@@ -21314,7 +21316,7 @@ GameObject:
|
|||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
m_StaticEditorFlags: 0
|
m_StaticEditorFlags: 0
|
||||||
m_IsActive: 0
|
m_IsActive: 1
|
||||||
--- !u!224 &1744675599
|
--- !u!224 &1744675599
|
||||||
RectTransform:
|
RectTransform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@@ -24908,7 +24910,7 @@ RectTransform:
|
|||||||
m_Father: {fileID: 496416183}
|
m_Father: {fileID: 496416183}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0.34615386, y: 1}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
m_SizeDelta: {x: 10, y: 0}
|
m_SizeDelta: {x: 10, y: 0}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
|||||||
@@ -808,8 +808,37 @@ public class GameManager : NetworkBehaviour
|
|||||||
// LevelLoadManager.LoadLevel("MainMenu");
|
// LevelLoadManager.LoadLevel("MainMenu");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool _thirdPlayerLeaveTriggered;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called when the local client spawns into a match. If three <see cref="NetPlayer"/> instances exist
|
||||||
|
/// (matchmaker sent an extra client into a full room), disconnect and return to the main menu.
|
||||||
|
/// </summary>
|
||||||
|
public void OnLocalPlayerJoinedMatch()
|
||||||
|
{
|
||||||
|
if (!isClient || _thirdPlayerLeaveTriggered)
|
||||||
|
return;
|
||||||
|
StartCoroutine(CoLeaveIfThirdPlayer());
|
||||||
|
}
|
||||||
|
|
||||||
|
IEnumerator CoLeaveIfThirdPlayer()
|
||||||
|
{
|
||||||
|
const int maxFrames = 30;
|
||||||
|
for (int i = 0; i < maxFrames; i++)
|
||||||
|
{
|
||||||
|
yield return null;
|
||||||
|
if (FindObjectsByType<NetPlayer>(FindObjectsSortMode.None).Length >= 3)
|
||||||
|
{
|
||||||
|
_thirdPlayerLeaveTriggered = true;
|
||||||
|
Logger.Log("Third player in a 2-player match (matchmaker bug); leaving to main menu.");
|
||||||
|
if (LevelLoadManager.instance != null)
|
||||||
|
LevelLoadManager.instance.Leave();
|
||||||
|
else
|
||||||
|
LevelLoadManager.LoadLevel("MainMenu");
|
||||||
|
yield break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void StopClient(){
|
public void StopClient(){
|
||||||
try{
|
try{
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ public class GameOverCanvas : MonoBehaviour
|
|||||||
const int MinimumRematchRcCoins = 20;
|
const int MinimumRematchRcCoins = 20;
|
||||||
|
|
||||||
[Header("Bet Limit")]
|
[Header("Bet Limit")]
|
||||||
|
public TMP_Text txtRcBalance;
|
||||||
public TMP_Text txtBetLimitWarning;
|
public TMP_Text txtBetLimitWarning;
|
||||||
public CanvasGroup betLimitAdjustPanel;
|
public CanvasGroup betLimitAdjustPanel;
|
||||||
//minVal: 2, max Val 500, when its 500, show ∞ on the text
|
//minVal: 2, max Val 500, when its 500, show ∞ on the text
|
||||||
@@ -59,6 +60,8 @@ public class GameOverCanvas : MonoBehaviour
|
|||||||
const int BetLimitMax = 500;
|
const int BetLimitMax = 500;
|
||||||
const int BetLimitUnlimited = 500;
|
const int BetLimitUnlimited = 500;
|
||||||
|
|
||||||
|
int rematchOpponentBetLimitCoins = BetLimitUnlimited;
|
||||||
|
|
||||||
[Header("Rematch panel")]
|
[Header("Rematch panel")]
|
||||||
public CanvasGroup rematchPanel;
|
public CanvasGroup rematchPanel;
|
||||||
public RectTransform rematchPopup;
|
public RectTransform rematchPopup;
|
||||||
@@ -130,6 +133,38 @@ public class GameOverCanvas : MonoBehaviour
|
|||||||
return PlayerPrefs.GetInt(PersonalBetLimitPrefsKey, BetLimitUnlimited);
|
return PlayerPrefs.GetInt(PersonalBetLimitPrefsKey, BetLimitUnlimited);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int EffectiveBetLimitCap(int limitCoins) =>
|
||||||
|
limitCoins >= BetLimitUnlimited ? int.MaxValue : limitCoins;
|
||||||
|
|
||||||
|
int GetRematchMaxBetCoins()
|
||||||
|
{
|
||||||
|
int maxBet = Mathf.Min(
|
||||||
|
EffectiveBetLimitCap(rematchOpponentBetLimitCoins),
|
||||||
|
GetRcCoins(LevelLoadManager.myPlayer),
|
||||||
|
GetRcCoins(LevelLoadManager.opponentPlayer));
|
||||||
|
return Mathf.Max(0, maxBet);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ApplyRematchBetSliderLimits()
|
||||||
|
{
|
||||||
|
if (betSlider == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
int maxBet = GetRematchMaxBetCoins();
|
||||||
|
betSlider.maxValue = maxBet;
|
||||||
|
if (maxBet <= 0)
|
||||||
|
{
|
||||||
|
betSlider.minValue = 0;
|
||||||
|
betSlider.value = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
betSlider.minValue = Mathf.Clamp(maxBet / 10f, 5, 10000);
|
||||||
|
betSlider.value = Mathf.Clamp(maxBet / 2, betSlider.minValue, maxBet);
|
||||||
|
}
|
||||||
|
OnBetSliderValueChanged(betSlider.value);
|
||||||
|
}
|
||||||
|
|
||||||
static void SetPersonalBetLimit(int limitCoins)
|
static void SetPersonalBetLimit(int limitCoins)
|
||||||
{
|
{
|
||||||
limitCoins = Mathf.Clamp(limitCoins, BetLimitMin, BetLimitMax);
|
limitCoins = Mathf.Clamp(limitCoins, BetLimitMin, BetLimitMax);
|
||||||
@@ -221,13 +256,16 @@ public class GameOverCanvas : MonoBehaviour
|
|||||||
void OnBtnRematchClicked(){
|
void OnBtnRematchClicked(){
|
||||||
if (!BothPlayersHaveMinimumRematchRc())
|
if (!BothPlayersHaveMinimumRematchRc())
|
||||||
return;
|
return;
|
||||||
|
if (txtBetLimitWarning != null)
|
||||||
|
txtBetLimitWarning.gameObject.SetActive(false);
|
||||||
NetPlayer.localPlayer.RequestRematch();
|
NetPlayer.localPlayer.RequestRematch();
|
||||||
SetRematchPendingState(true);
|
SetRematchPendingState(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnRematchRequested(){
|
public void OnRematchRequested(int opponentMaxBetLimitCoins){
|
||||||
|
rematchOpponentBetLimitCoins = opponentMaxBetLimitCoins;
|
||||||
if(winningTeam == myTeam){
|
if(winningTeam == myTeam){
|
||||||
//Only i can initiate the rematch, so here we go
|
//Only the loser can initiate the rematch; winner sets the stake
|
||||||
ShowRematchPanel();
|
ShowRematchPanel();
|
||||||
}else{
|
}else{
|
||||||
rematchWarningLoser.text = "Waiting for opponent to accept";
|
rematchWarningLoser.text = "Waiting for opponent to accept";
|
||||||
@@ -378,6 +416,7 @@ public class GameOverCanvas : MonoBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
UpdateRematchAvailability();
|
UpdateRematchAvailability();
|
||||||
|
ApplyRcBalancesToUi(null);
|
||||||
|
|
||||||
StartCoroutine(CoroutineShow());
|
StartCoroutine(CoroutineShow());
|
||||||
|
|
||||||
@@ -461,11 +500,8 @@ public class GameOverCanvas : MonoBehaviour
|
|||||||
|
|
||||||
public void ShowRematchPanel(){
|
public void ShowRematchPanel(){
|
||||||
SetRematchPendingState(true);
|
SetRematchPendingState(true);
|
||||||
|
ApplyRematchBetSliderLimits();
|
||||||
StartCoroutine(CoroutineShowRematchPanel());
|
StartCoroutine(CoroutineShowRematchPanel());
|
||||||
|
|
||||||
betSlider.maxValue = (LevelLoadManager.myPlayer.rc < LevelLoadManager.opponentPlayer.rc) ? LevelLoadManager.myPlayer.rc : LevelLoadManager.opponentPlayer.rc;
|
|
||||||
betSlider.value = betSlider.maxValue / 2;
|
|
||||||
betSlider.minValue = Mathf.Clamp(betSlider.maxValue /10f,5,10000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator CoroutineShowRematchPanel(){
|
IEnumerator CoroutineShowRematchPanel(){
|
||||||
@@ -528,9 +564,15 @@ public class GameOverCanvas : MonoBehaviour
|
|||||||
txtMyRCBalance.text = myText;
|
txtMyRCBalance.text = myText;
|
||||||
if (txtOpponentRCBalance != null)
|
if (txtOpponentRCBalance != null)
|
||||||
txtOpponentRCBalance.text = oppText;
|
txtOpponentRCBalance.text = oppText;
|
||||||
|
if (txtRcBalance != null)
|
||||||
|
txtRcBalance.text = loadingPlaceholder ?? (my != null ? CoinHelper.FormatString((int)my.rc) + " RC" : "0.0 RC");
|
||||||
|
|
||||||
if (loadingPlaceholder == null)
|
if (loadingPlaceholder == null)
|
||||||
|
{
|
||||||
UpdateRematchAvailability();
|
UpdateRematchAvailability();
|
||||||
|
if (rematchPanel != null && rematchPanel.alpha > 0.01f)
|
||||||
|
ApplyRematchBetSliderLimits();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int GetRcCoins(MatchmadePlayer player) =>
|
static int GetRcCoins(MatchmadePlayer player) =>
|
||||||
|
|||||||
@@ -36,6 +36,9 @@ public class NetPlayer : NetworkBehaviour
|
|||||||
SetMyData(GameManager.MyTeam == Team.Red ? GameManager.RedPlayer.UserId : GameManager.BluePlayer.UserId);
|
SetMyData(GameManager.MyTeam == Team.Red ? GameManager.RedPlayer.UserId : GameManager.BluePlayer.UserId);
|
||||||
#endif
|
#endif
|
||||||
TeamSpecificEffects.instance.SetTeamSpecificEffects(myTeam);
|
TeamSpecificEffects.instance.SetTeamSpecificEffects(myTeam);
|
||||||
|
|
||||||
|
if (GameManager.instance != null)
|
||||||
|
GameManager.instance.OnLocalPlayerJoinedMatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetMyData(int uid){
|
void SetMyData(int uid){
|
||||||
@@ -419,29 +422,30 @@ public class NetPlayer : NetworkBehaviour
|
|||||||
/// Request a rematch with the opponent.
|
/// Request a rematch with the opponent.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void RequestRematch(){
|
public void RequestRematch(){
|
||||||
|
int maxBetLimitCoins = GameOverCanvas.GetPersonalBetLimit();
|
||||||
if(isServer){
|
if(isServer){
|
||||||
GameOverCanvas.instance.OnRematchRequested();
|
GameOverCanvas.instance.OnRematchRequested(maxBetLimitCoins);
|
||||||
RpcRequestRematch();
|
RpcRequestRematch(maxBetLimitCoins);
|
||||||
}else{
|
}else{
|
||||||
CmdRequestRematch();
|
CmdRequestRematch(maxBetLimitCoins);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Command]
|
[Command]
|
||||||
void CmdRequestRematch(){
|
void CmdRequestRematch(int maxBetLimitCoins){
|
||||||
Logger.Log("Rematch requested");
|
Logger.Log("Rematch requested, max bet limit coins: " + maxBetLimitCoins);
|
||||||
|
|
||||||
if(isServerOnly){
|
if(isServerOnly){
|
||||||
//server
|
//server
|
||||||
}else{
|
}else{
|
||||||
GameOverCanvas.instance.OnRematchRequested();
|
GameOverCanvas.instance.OnRematchRequested(maxBetLimitCoins);
|
||||||
}
|
}
|
||||||
RpcRequestRematch();
|
RpcRequestRematch(maxBetLimitCoins);
|
||||||
}
|
}
|
||||||
|
|
||||||
[ClientRpc]
|
[ClientRpc]
|
||||||
void RpcRequestRematch(){
|
void RpcRequestRematch(int maxBetLimitCoins){
|
||||||
GameOverCanvas.instance.OnRematchRequested();
|
GameOverCanvas.instance.OnRematchRequested(maxBetLimitCoins);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ PlayerSettings:
|
|||||||
loadStoreDebugModeEnabled: 0
|
loadStoreDebugModeEnabled: 0
|
||||||
visionOSBundleVersion: 1.0
|
visionOSBundleVersion: 1.0
|
||||||
tvOSBundleVersion: 1.0
|
tvOSBundleVersion: 1.0
|
||||||
bundleVersion: 1.16
|
bundleVersion: 1.18
|
||||||
preloadedAssets:
|
preloadedAssets:
|
||||||
- {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
|
- {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
|
||||||
metroInputSource: 0
|
metroInputSource: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user