Work has begun on the Europe map.
This commit is contained in:
@@ -44,7 +44,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 11
|
||||
Data: 12
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
@@ -578,13 +578,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _SuccessCounter
|
||||
Data: _Timer
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 36|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _SuccessCounter
|
||||
Data: _Timer
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 29
|
||||
@@ -626,13 +626,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _FailureCounter
|
||||
Data: _SuccessCounter
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 38|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _FailureCounter
|
||||
Data: _SuccessCounter
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 29
|
||||
@@ -669,6 +669,54 @@ MonoBehaviour:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: _FailureCounter
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 40|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: _FailureCounter
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 29
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 29
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
- Name:
|
||||
Entry: 6
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <IsSerialized>k__BackingField
|
||||
Entry: 5
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 41|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name:
|
||||
Entry: 13
|
||||
Data:
|
||||
|
||||
@@ -30,6 +30,9 @@ public class GameManagerRound3 : GameManagerBase
|
||||
private DataDictionary _ContinentData;
|
||||
private int _StageIndex = 0;
|
||||
|
||||
private int _Timer = TIMER_LENGTH;
|
||||
private const int TIMER_LENGTH = 45;
|
||||
|
||||
private int _SuccessCounter = 0;
|
||||
private int _FailureCounter = 0;
|
||||
private const int MAX_FAILURE_COUNT = 2;
|
||||
@@ -94,16 +97,11 @@ public class GameManagerRound3 : GameManagerBase
|
||||
_SuccessCounter++;
|
||||
if (_SuccessCounter >= MAX_SUCCESS_COUNT)
|
||||
{
|
||||
HostCardBetweenRoundsInterface GameWinInterface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
|
||||
|
||||
GameWinInterface.HeaderUI.text = "The player has won the game.";
|
||||
GameHasBeenWon();
|
||||
}
|
||||
else
|
||||
{
|
||||
int NextCountry = GetCurrentMap().NextCountry();
|
||||
_Markers[NextCountry].EnablePickup(true);
|
||||
UpdateInterface();
|
||||
SetUpNextCountry();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,10 +112,8 @@ public class GameManagerRound3 : GameManagerBase
|
||||
{
|
||||
_FailureCounter = 0;
|
||||
GetCurrentMarker().EnablePickup(false);
|
||||
int NextCountry = GetCurrentMap().NextCountry();
|
||||
_Markers[NextCountry].EnablePickup(true);
|
||||
|
||||
UpdateInterface();
|
||||
SetUpNextCountry();
|
||||
}
|
||||
|
||||
PlayIncorrectSound();
|
||||
@@ -144,6 +140,32 @@ public class GameManagerRound3 : GameManagerBase
|
||||
return GetCurrentMap().GetCurrentCity();
|
||||
}
|
||||
|
||||
public void SetUpNextCountry()
|
||||
{
|
||||
int NextCountry = GetCurrentMap().NextCountry();
|
||||
if (NextCountry < 0)
|
||||
{
|
||||
// If we ran out of countries, lose the game here.
|
||||
GameHasBeenLost(true);
|
||||
return;
|
||||
}
|
||||
_Markers[NextCountry].EnablePickup(true);
|
||||
UpdateInterface();
|
||||
}
|
||||
|
||||
public void GameHasBeenWon()
|
||||
{
|
||||
HostCardBetweenRoundsInterface GameWinInterface =
|
||||
(HostCardBetweenRoundsInterface)GetHostCardInterface(RoundSegmentType.BetweenSegments);
|
||||
|
||||
GameWinInterface.HeaderUI.text = "The player has won the game.";
|
||||
}
|
||||
|
||||
public void GameHasBeenLost(bool RanOutOfMarkers = false)
|
||||
{
|
||||
Debug.LogError("Game was lost. Ran out of " + (RanOutOfMarkers ? "markers" : "time") + ".");
|
||||
}
|
||||
|
||||
|
||||
public void PlayCorrectSound()
|
||||
{
|
||||
|
||||
@@ -53,7 +53,11 @@ public class FloorMap : UdonSharpBehaviour
|
||||
public int NextCountry()
|
||||
{
|
||||
_CurrentCountry++;
|
||||
Debug.LogError("Current location: " + _ChosenCities[_CurrentCountry] + ", " + _ChosenCountries[_CurrentCountry]);
|
||||
if (_CurrentCountry >= MAX_SELECTED_COUNTRIES)
|
||||
{
|
||||
Debug.LogError("We ran out of countries. Just end the game here.");
|
||||
return -1;
|
||||
}
|
||||
return _CurrentCountry;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user