public Update ( |
||
playerPos | ||
return | void |
public virtual void Update(PositionComponent playerPos)
{
scrollDist += Const.ScrollSpeed;
if (JoinInfo.type == JoinType.Vertical && scrollDist >= Game.CurrentGame.PixelsAcross ||
JoinInfo.type == JoinType.Horizontal && scrollDist >= Game.CurrentGame.PixelsDown)
{
Finish(playerPos);
}
else
{
MovePlayer(playerPos);
}
Calculate();
}
private void OnScrollTriggered(JoinHandler join) { currentJoin = join; Player.Paused = true; nextScreen = screens[join.NextScreenName]; join.BeginScroll(nextScreen, PlayerPos.Position); updateFunc = () => join.Update(PlayerPos); join.ScrollDone += ScrollDone; drawFunc = DrawJoin; StopScreen(); }