fixing 2 seconds delay.

This commit is contained in:
Sarah 2015-11-26 16:26:49 +01:00
parent a653f053a5
commit 21f859f579
2 changed files with 16 additions and 7 deletions

View File

@ -54,12 +54,13 @@ public abstract class GameTutorial
@Override
public void run()
{
nextPhase();
nextPhase(true);
}
}, 40);
_currentPhase.teleport();
}
protected void nextPhase()
protected void nextPhase(boolean phaseOne)
{
_currentPhase = getNextPhase();
if(_currentPhase == null)
@ -73,7 +74,7 @@ public abstract class GameTutorial
{
Manager.GetChat().Silence(7000, false);
onPhaseChange(_currentPhase);
_currentPhase.start();
_currentPhase.start(phaseOne);
}
}

View File

@ -25,16 +25,24 @@ public abstract class TutorialPhase
_text = text;
}
final public void start()
final public void start(boolean phaseOne)
{
_hasEnded = false;
onStart();
if(!phaseOne)
{
teleport();
}
displayText();
}
final public void teleport()
{
if(_location != null && _target != null)
{
prepareLocations();
updatePlayers();
}
displayText();
}
private void prepareLocations()
@ -99,7 +107,7 @@ public abstract class TutorialPhase
{
_hasEnded = true;
onEnd();
_tutorial.nextPhase();
_tutorial.nextPhase(false);
}
});
break;