Prepare Timer flag.
This commit is contained in:
parent
27f335779a
commit
19254fc4a0
@ -33,6 +33,7 @@ public abstract class GameTutorial
|
|||||||
public boolean TeleportOnEnd = true;
|
public boolean TeleportOnEnd = true;
|
||||||
public boolean RunTasksSync = true;
|
public boolean RunTasksSync = true;
|
||||||
public boolean PlayTutorialSounds = false;
|
public boolean PlayTutorialSounds = false;
|
||||||
|
public boolean ShowPrepareTimer = false;
|
||||||
|
|
||||||
public long TimeBetweenPhase = 0;
|
public long TimeBetweenPhase = 0;
|
||||||
public long StartAfterTutorial = 5000;
|
public long StartAfterTutorial = 5000;
|
||||||
|
@ -122,7 +122,7 @@ public class GameManager implements Listener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isInTutorial()
|
public boolean isInTutorial(boolean checkForTimer)
|
||||||
{
|
{
|
||||||
if (Manager.GetGame() == null || Manager.GetGame().GetState() != GameState.Prepare)
|
if (Manager.GetGame() == null || Manager.GetGame().GetState() != GameState.Prepare)
|
||||||
return false;
|
return false;
|
||||||
@ -160,6 +160,13 @@ public class GameManager implements Listener
|
|||||||
{
|
{
|
||||||
finished = false;
|
finished = false;
|
||||||
}
|
}
|
||||||
|
if(checkForTimer)
|
||||||
|
{
|
||||||
|
if(team.getTutorial().ShowPrepareTimer)
|
||||||
|
finished = false;
|
||||||
|
else
|
||||||
|
finished = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!finished)
|
if(!finished)
|
||||||
@ -179,7 +186,7 @@ public class GameManager implements Listener
|
|||||||
|
|
||||||
Game game = Manager.GetGame();
|
Game game = Manager.GetGame();
|
||||||
|
|
||||||
if(isInTutorial())
|
if(isInTutorial(true))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
double percentage = (double) (System.currentTimeMillis() - game.GetStateTime()) / game.PrepareTime;
|
double percentage = (double) (System.currentTimeMillis() - game.GetStateTime()) / game.PrepareTime;
|
||||||
@ -264,7 +271,7 @@ public class GameManager implements Listener
|
|||||||
}
|
}
|
||||||
else if (game.GetState() == GameState.Prepare)
|
else if (game.GetState() == GameState.Prepare)
|
||||||
{
|
{
|
||||||
if(isInTutorial())
|
if(isInTutorial(false))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (game.CanStartPrepareCountdown())
|
if (game.CanStartPrepareCountdown())
|
||||||
|
Loading…
Reference in New Issue
Block a user