MegaMan.Engine.JoinHandler.BeginScroll C# (CSharp) Méthode

BeginScroll() public méthode

public BeginScroll ( MegaMan.Engine.ScreenHandler next, PointF playerPos ) : void
next MegaMan.Engine.ScreenHandler
playerPos MegaMan.Common.Geometry.PointF
Résultat void
        public virtual void BeginScroll(ScreenHandler next, PointF playerPos)
        {
            scrollDist = 0;

            tickdist = (TriggerSize() + OffsetDist()) / ticks;

            this.nextHeight = next.Screen.PixelHeight;
            this.nextWidth = next.Screen.PixelWidth;

            if (direction == Direction.Down) NextScreenY = -height;
            else if (direction == Direction.Right) NextScreenX = -width;
            else if (direction == Direction.Left) NextScreenX = nextWidth;
            else if (direction == Direction.Up) NextScreenY = nextHeight;

            Calculate();
        }

Usage Example

Exemple #1
0
        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();
        }