Beispiel #1
0
        /// <summary>
        /// Code to run each tick
        /// </summary>
        private void Tick()
        {
            offsetVector  = RotationHelper.Direction2DFromAngle(offsetAngle, owner.RotationAngle);
            offsetVector  = offsetVector * offsetMagnitude;
            Position2D    = owner.Position2D + offsetVector;
            RotationAngle = owner.RotationAngle;

            if (IsParent)
            {
                if (health < 0)
                {
                    health = 0;
                }
            }

            //Burn damage
            if (isParent && isBurning && GM.eventM.Elapsed(tiBurnTick))
            {
                health--;
                for (int i = 0; i < GM.r.FloatBetween(1, 2); i++)
                {
                    FadingParticle smokeParticle = new FadingParticle(new Vector2(Centre2D.X + GM.r.FloatBetween(-2, 2), Centre2D.Y + GM.r.FloatBetween(-2, 2)),
                                                                      new Vector3(GM.r.FloatBetween(-4, 4), GM.r.FloatBetween(-4, 4), 0),
                                                                      GM.r.FloatBetween(0, 360), GM.r.FloatBetween(5, 10));
                    smokeParticle.Wash = Color.DarkSlateGray;
                }
                if (GM.r.FloatBetween(0, 1) > 0.90)
                {
                    Ship ship = (Ship)owner;
                    ship.CrewNum -= 1;
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// act on key sets to move player and shoot
        /// </summary>
        private void Move()
        {
            //For gunSprite
            Vector2 aimPos    = GM.inputM.MouseLocation;
            Vector2 direction = aimPos - Position2D;

            direction = Vector2.Normalize(direction);
            RotationHelper.FaceDirection(gunSprite, direction, DirectionAccuracy.free, 0);
            gunSprite.Position2D = Position2D + (direction * 15);
            Vector2 currentPosition = Position2D;

            //For console
            if (GM.inputM.KeyPressed(Keys.C))
            {
                debugMode = true;
            }
            if (debugMode == true)
            {
                GM.textM.Draw(FontBank.arcadePixel, "Debug", GM.screenSize.Left + 175, GM.screenSize.Top + 40, TextAtt.TopLeft);

                if (GM.inputM.KeyPressed(Keys.F5))
                {
                    LaserEnemy laserEnemy = new LaserEnemy(GM.inputM.MouseLocation, false);
                }
                if (GM.inputM.KeyPressed(Keys.F12))
                {
                    GameSetup.EnemySpawnSystem.Kill();
                }
            }

            //For dodging
            Vector3 d = new Vector3(0, 0, 0);

            if (tiBoostDelay == null || tiBoostDelay.ElapsedSoFar > 0.25f)
            {
                if (GM.inputM.KeyDown(MoveLeft))
                {
                    d += Vector3.Left;
                }
                if (GM.inputM.KeyDown(MoveRight))
                {
                    d += Vector3.Right;
                }
                if (GM.inputM.KeyDown(Forward))
                {
                    d += Vector3.Down;
                }
                if (GM.inputM.KeyDown(Backward))
                {
                    d += Vector3.Up;
                }
                if (d == new Vector3(0, 0, 0))
                {
                    RotationHelper.FaceDirection(this, Vector3.Down, DirectionAccuracy.free, 0);
                }
                else
                {
                    RotationHelper.FaceDirection(this, d, DirectionAccuracy.free, 0);
                    RotationHelper.VelocityInCurrentDirection(this, 500, 0);
                }
            }

            //For directionSprite
            Vector3 dNorm = d;

            dNorm.Normalize();
            RotationHelper.FaceDirection(directionSprite, dNorm, DirectionAccuracy.free, 0);
            directionSprite.Position = Position + (dNorm * 20);

            //For firing
            if ((GM.inputM.KeyDown(Fire) || GM.inputM.MouseLeftButtonHeld()) && GM.eventM.Elapsed(tiFireCooldown))
            {
                //create bullet and pass reference to player and angle
                new Bullet(this, aimPos, 1500f, 10);
            }

            if (GM.inputM.KeyDown(SpecialFire) && (tiSpecialFireCooldown == null || GM.eventM.Elapsed(tiSpecialFireCooldown)))
            {
                for (int i = 0; i < 360; i += 5)
                {
                    Vector3 v3ShootAngle = RotationHelper.MyDirection(this, i);
                    Vector2 v2ShootAngle = new Vector2(v3ShootAngle.X, v3ShootAngle.Y);

                    RotationHelper.Direction2DFromAngle(i, 0);

                    //create bullet and pass reference to player and angle
                    new Bullet(this, Position2D + v2ShootAngle, 750, 50);
                }

                for (int i = 0; i < 360; i += 10)
                {
                    Vector3 v3ShootAngle = RotationHelper.MyDirection(this, i);
                    Vector2 v2ShootAngle = new Vector2(v3ShootAngle.X, v3ShootAngle.Y);

                    RotationHelper.Direction2DFromAngle(i, 0);

                    //create bullet and pass reference to player and angle
                    new Bullet(this, Position2D + v2ShootAngle, 500, 50);
                }

                if (tiSpecialFireCooldown == null)
                {
                    GM.eventM.AddTimer(tiSpecialFireCooldown = new Event(10f, "Special Fire Cooldown"));
                }
            }

            //For boosting
            if (GM.inputM.KeyPressed(Boost) && (tiBoostDelay == null || GM.eventM.Elapsed(tiBoostDelay)) && d != Vector3.Zero)
            {
                if (tiBoostDelay == null)
                {
                    GM.eventM.AddTimer(tiBoostDelay = new Event(0.5f, "dodge delay"));
                }

                //Raycasting to check for collisions and offset to avoid collision
                //Position += d * 100;
                //Ray findHits = new Ray(Position, d);

                Friction     = 0f;
                Velocity    += dNorm * 800;
                invulnerable = true;
                Wash         = Color.LightGreen;
            }

            //Resetting dodge delay for displaying
            if (tiBoostDelay != null && tiBoostDelay.ElapsedSoFar > 0.25f)
            {
                Friction     = 10f;
                invulnerable = false;
                Wash         = Color.LimeGreen;
            }

            //Locking sequence
            if (GM.inputM.MouseRightButtonPressed())
            {
                lockSprite.Visible = true;

                attack = null;
                float bestDistance = int.MaxValue;

                foreach (Sprite s in GM.engineM.SpriteList)
                {
                    if (s is Enemy)
                    {
                        if (attack == null || Vector2.DistanceSquared(aimPos, s.Centre2D) < bestDistance)
                        {
                            attack       = s;
                            bestDistance = Vector2.DistanceSquared(aimPos, s.Centre2D);
                        }
                    }
                }
                if (attack != null)
                {
                    lockSprite.Position2D = attack.Position2D;
                }
            }

            if (GM.inputM.MouseRightButtonHeld() && GM.eventM.Elapsed(tiLockingDelay) && attack != null)
            {
                GM.eventM.AddEventRaiseOnce(beepCountDown = new Event(0.25f, "Beep Countdown"));
                float graphicsLockAmount = lockAmount / 4;
                Color color = new Color();
                if (lockAmount < 1)
                {
                    lockAmount += tiLockingDelay.Interval * 4;
                    lockSprite.RotationAngle = 360 * graphicsLockAmount;
                    color.R = (byte)(250 * lockAmount);
                    color.B = (byte)(255 - color.R);
                }
                else
                {
                    lockSprite.RotationAngle = 0;
                    color.R = (byte)(255);
                    color.B = (byte)(0);
                }
                if (GM.eventM.Elapsed(beepCountDown))
                {
                    //Beep sound effect
                }

                lockSprite.Position2D = attack.Position2D;
                lockSprite.ScaleBoth  = 1.5f + (1 - lockAmount);
                lockSprite.Wash       = color;
            }

            if (GM.inputM.MouseRightButtonReleased())
            {
                if (lockAmount >= 1 && (tiAltFireCooldown == null || GM.eventM.Elapsed(tiAltFireCooldown)))
                {
                    FireMissile(attack);
                }
                lockSprite.Visible = false;
                lockAmount         = 0;
            }
        }
Beispiel #3
0
        /// <summary>
        /// Code to run each tick
        /// </summary>
        private void Tick()
        {
            //DEBUG
            //GM.textM.Draw(FontBank.arcadePixel,
            //    "Hull Front  " + hitBoxHullFront.Health + "~Hull Back   " + hitBoxHullBack.Health + "~Hull Left   " + hitBoxHullLeft.Health + "~Hull Right  " + hitBoxHullRight.Health +
            //    "~Sail Front  " + hitBoxSailFront.Health + "~Sail Middle " + hitBoxSailMiddle.Health + "~Sail Back   " + hitBoxSailBack.Health, 100, 100, TextAtt.TopLeft);
            GM.textM.Draw(FontBank.arcadePixel, "Crew: " + CrewNum +
                          "~~Ammunition:~    Round: " + roundShotNum + "~    Bar: " + barShotNum + "~    Carcass: " + carcassShotNum + "~    Grape: " + grapeShotNum + "~    Grapple: " + grappleShotNum +
                          "~~Repair Materials:~    Hull: " + (int)hullRepMats + "~    Sail: " + (int)sailRepMats,
                          100, 50, TextAtt.TopLeft);

            //Sinking bar
            UISinkBarTop.SY = sinkAmount * 0.1f;

            //Make camera follow player
            GameSetup.PlayerView.Position = Position - new Vector3(GM.screenSize.Center.X, GM.screenSize.Center.Y - 100, 0);

            //UI updates
            if (!tiReloadRight.Paused && !IsRepairing)
            {
                UIReloadRight.Visible = true;
                float heightMul = (tiReloadRight.Interval - tiReloadRight.ElapsedSoFar) / tiReloadRight.Interval;
                UIReloadRight.SY = 50 * heightMul;
            }
            if (!tiReloadLeft.Paused && !IsRepairing)
            {
                UIReloadLeft.Visible = true;
                float heightMul = (tiReloadLeft.Interval - tiReloadLeft.ElapsedSoFar) / tiReloadLeft.Interval;
                UIReloadLeft.SY = 50 * heightMul;
            }

            //Mouse inputs
            //Set sail amount
            if (speedButton.PressedLeft())
            {
                if (sailAmount == 0)
                {
                    sailAmount++;
                    speedButton.SetDisplay(new Rectangle(82, 159, 12, 40));
                }
                else if (sailAmount == 1)
                {
                    sailAmount++;
                    speedButton.SetDisplay(new Rectangle(95, 159, 12, 40));
                }
            }
            else if (speedButton.PressedRight())
            {
                if (sailAmount == 1)
                {
                    sailAmount--;
                    speedButton.SetDisplay(new Rectangle(75, 159, 6, 40));
                }
                else if (sailAmount == 2)
                {
                    sailAmount--;
                    speedButton.SetDisplay(new Rectangle(82, 159, 12, 40));
                }
            }

            //Set shot type
            if (fireRightButton.PressedRight())
            {
                GM.eventM.AddTimer(tiReloadLeft = new Event(10, "Reload Cooldown Right"));
                switch (shotTypeRight)
                {
                case 0:
                    shotTypeRight = 1;
                    fireRightButton.SetDisplay(new Rectangle(190, 164, 28, 12));
                    break;

                case 1:
                    shotTypeRight = 2;
                    fireRightButton.SetDisplay(new Rectangle(238, 152, 20, 28));
                    break;

                case 2:
                    shotTypeRight = 3;
                    fireRightButton.SetDisplay(new Rectangle(278, 156, 28, 28));
                    break;

                case 3:
                    shotTypeRight = 4;
                    fireRightButton.SetDisplay(new Rectangle(326, 160, 20, 20));
                    break;

                case 4:
                    shotTypeRight = 0;
                    fireRightButton.SetDisplay(new Rectangle(150, 160, 20, 20));
                    break;
                }
            }
            if (fireLeftButton.PressedRight())
            {
                GM.eventM.AddTimer(tiReloadRight = new Event(10, "Reload Cooldown Left"));
                switch (shotTypeLeft)
                {
                case 0:
                    shotTypeLeft = 1;
                    fireLeftButton.SetDisplay(new Rectangle(190, 164, 28, 12));
                    break;

                case 1:
                    shotTypeLeft = 2;
                    fireLeftButton.SetDisplay(new Rectangle(238, 152, 20, 28));
                    break;

                case 2:
                    shotTypeLeft = 3;
                    fireLeftButton.SetDisplay(new Rectangle(278, 156, 28, 28));
                    break;

                case 3:
                    shotTypeLeft = 4;
                    fireLeftButton.SetDisplay(new Rectangle(326, 160, 20, 20));
                    break;

                case 4:
                    shotTypeLeft = 0;
                    fireLeftButton.SetDisplay(new Rectangle(150, 160, 20, 20));
                    break;
                }
            }

            //Fire cannons
            if (fireRightButton.PressedLeft())
            {
                Fire(true, shotTypeRight);
            }
            if (fireLeftButton.PressedLeft())
            {
                Fire(false, shotTypeLeft);
            }

            if (fireRightButton.Hover())
            {
                fireZone.Visible       = true;
                fireZone.Position2D    = Position2D - RotationHelper.Direction2DFromAngle(RotationAngle, 90) * 220;
                fireZone.RotationAngle = RotationAngle;
            }
            else if (fireLeftButton.Hover())
            {
                fireZone.Visible       = true;
                fireZone.Position2D    = Position2D + RotationHelper.Direction2DFromAngle(RotationAngle, 90) * 220;
                fireZone.RotationAngle = RotationAngle;
            }
            else
            {
                fireZone.Visible = false;
            }

            //Repair ship
            if (RepairButton.PressedLeft())
            {
                IsRepairing = true;
            }
            if (RepairButton.PressedRight())
            {
                IsRepairing = false;
                if (!leftLoaded)
                {
                    tiReloadLeft.Paused = false;
                }
                if (!rightLoaded)
                {
                    tiReloadRight.Paused = false;
                }
            }
            if (IsRepairing)
            {
                fireLeftButton.Faded  = true;
                fireRightButton.Faded = true;
            }
            else
            {
                fireLeftButton.Faded  = false;
                fireRightButton.Faded = false;
            }

            //Cut boarding ropes
            if (cutRopeButton.PressedLeft() && (isBoarded || isBoarding))
            {
                cutBoardingRopes();
            }
            if (!isBoarded && !isBoarding)
            {
                cutRopeButton.Faded = true;
            }
            else
            {
                cutRopeButton.Faded = false;
            }

            //Movement orders
            //Check that no clicks are made on UI background
            for (int i = 0; i < UIBackgroundElements.Length; i++)
            {
                if (UIBackgroundElements[i].PressedLeft() || UIBackgroundElements[i].PressedRight() || UIBackgroundElements[i].HeldLeft() || UIBackgroundElements[i].HeldRight())
                {
                }
            }

            if (buttonPressed == false)
            {
                if (GM.inputM.MouseRightButtonPressed())
                {
                    cursor.Mode = 1;
                    movePath    = new Queue <Point>(100);
                    moveTo      = PointHelper.PointFromVector2(cursor.Position2D + Position2D + new Vector2(-800, -350));
                    movePath.Enqueue(moveTo);
                    moveTargetReached = false;
                    arrowQueue.Reset();
                }
                else if (GM.inputM.MouseRightButtonHeld() &&
                         PointHelper.DistanceSquared(
                             new Point((int)(GameSetup.PlayerView.ViewPortOutline.Left + GM.inputM.MouseLocation.X), (int)(GameSetup.PlayerView.ViewPortOutline.Top + GM.inputM.MouseLocation.Y)),
                             moveTo)
                         > 1000)
                {
                    cursor.Mode = 2;
                    Vector2 newMoveTo = cursor.Position2D + Position2D + new Vector2(-800, -350);
                    if (movePath.Count == 1)
                    {
                        arrowQueue = new ArrowQueue(PointHelper.Vector2FromPoint(moveTo), newMoveTo);
                    }
                    else
                    {
                        arrowQueue.Enqueue(newMoveTo);
                    }
                    moveTo = PointHelper.PointFromVector2(newMoveTo);
                    movePath.Enqueue(moveTo);
                }
                else
                {
                    cursor.Mode = 0;
                }
            }
            else
            {
                buttonPressed = false;
            }

            if (moveTargetReached == false)
            {
                if (movePath.Count > 0)
                {
                    MoveToPoint(movePath.Peek());
                }
                else
                {
                    moveTargetReached = true;
                }
            }
        }
Beispiel #4
0
        /// <summary>
        /// Code to run each tick
        /// </summary>
        private void Tick()
        {
            //DEBUG
            //GM.textM.Draw(FontBank.arcadePixel,
            //    "Hull Front  " + hitBoxHullFront.Health + "~Hull Back   " + hitBoxHullBack.Health + "~Hull Left   " + hitBoxHullLeft.Health + "~Hull Right  " + hitBoxHullRight.Health +
            //    "~Sail Front  " + hitBoxSailFront.Health + "~Sail Middle " + hitBoxSailMiddle.Health + "~Sail Back   " + hitBoxSailBack.Health, GM.screenSize.Width - 100, 100, TextAtt.TopRight);
            //GM.textM.Draw(FontBank.arcadePixel, "Crew: " + CrewNum, GM.screenSize.Width - 150, 50, TextAtt.TopRight);
            //GM.textM.Draw(FontBank.arcadePixel, "State: " + state, GM.screenSize.Width - 150, 75, TextAtt.TopRight);

            if (GM.eventM.Elapsed(stateTick))
            {
                state = StateMachine();
            }

            if (state == 1 || state == 3) //Attacking or boarding
            {
                sailAmount = 2;
                Point movePoint = Point.Zero;

                //Direction vectors for front and right of player
                Vector2 playerFront       = RotationHelper.Direction2DFromAngle(player.RotationAngle, 0);
                Vector2 playerRight       = RotationHelper.Direction2DFromAngle(player.RotationAngle, 90);
                Vector2 directionToPlayer = Vector2.Normalize(Position2D - player.Position2D);

                ////1 if front of ships opposite, -1 otherwise.
                //float angleBetweenFront = RotationHelper.BearingTo(RotationHelper.Direction2DFromAngle(RotationAngle, 0), playerFront, DirectionAccuracy.free, 0) - RotationAngle;
                //int frontOpposite = -1;
                //if (angleBetweenFront > 135 || angleBetweenFront < -135)
                //{
                //    frontOpposite = 1;
                //}

                float angleFromPlayer = RotationHelper.BearingTo(Position2D, player.Position2D, DirectionAccuracy.free, 0) - RotationAngle;
                if (angleFromPlayer < -180)
                {
                    angleFromPlayer += 360;
                }

                //1 if side of ships opposite, -1 otherwise.
                int   playerOnRight    = -1;
                float angleBetweenSide = RotationHelper.BearingTo(Vector2.Normalize(Position2D - RotationHelper.Direction2DFromAngle(RotationAngle, 0)), playerRight, DirectionAccuracy.free, 0) - RotationAngle;
                if (angleFromPlayer > 0)
                {
                    playerOnRight = 1;
                }

                //See if player is aligned with the midpoint of the AI's side.
                sideFaceSprite.Position2D    = Position2D;
                sideFaceSprite.RotationAngle = RotationAngle + (90 * playerOnRight);
                float alignment = RotationHelper.AngularDirectionTo(sideFaceSprite, player.Position, 0, false);

                bool readyToFire = false;
                if (alignmentLastTick != alignment /* && ((angleFromPlayer < -80 && angleFromPlayer > -100) || angleFromPlayer > 80 && angleFromPlayer < 100)*/)
                {
                    readyToFire = true;
                }
                alignmentLastTick = alignment;

                if ((state == 1 && Vector2.DistanceSquared(Position2D, player.Position2D) > 100000) || (state == 3 && Vector2.DistanceSquared(Position2D, player.Position2D) > 125000)) //Out of range
                {
                    movePoint = PointHelper.PointFromVector2(player.Position2D + (playerRight * 100 * playerOnRight));
                }
                else //Within range
                {
                    sailAmount = 1;
                    //movePoint = PointHelper.PointFromVector2(player.Position2D + (playerRight * 100) + (playerFront * 1000 * frontOpposite));
                    movePoint = PointHelper.PointFromVector2(Position2D + 100 * RotationHelper.Direction2DFromAngle(RotationAngle, 90 * alignment * playerOnRight));

                    if (readyToFire || isBoarded || isBoarding)
                    {
                        if (angleFromPlayer > 45 && angleFromPlayer < 135)
                        {
                            Fire(false, shotTypeLeft);
                        }
                        else if (angleFromPlayer < -45 && angleFromPlayer > -135)
                        {
                            Fire(true, shotTypeRight);
                        }
                    }
                }
                //DEBUG
                GM.textM.Draw(FontBank.arcadePixel, "Alignment" + angleFromPlayer + "~Rotation" + RotationAngle, GM.screenSize.Width - 150, 10, TextAtt.TopRight);

                MoveToPoint(movePoint);
            }
            if (state == 2) //Retreating
            {
                MoveToPoint(PointHelper.PointFromVector2(Position2D + (Vector2.Normalize(Position2D - player.Position2D) * 200)));
            }
            if (state == 3)//Boarding
            {
            }
        }
Beispiel #5
0
 /// <summary>
 /// Returns a point that is infront of the sprite. It is infront when the additional angle is 0
 /// </summary>
 /// <param name="additionalAngle">angle away from normal</param>
 /// <returns></returns>
 private Vector2 collistionRadius(int additionalAngle)
 {
     //return new Vector2(Position2D.X + RotationHelper.Direction2DFromAngle(RotationAngle, additionalAngle).X * 10, Position2D.Y + RotationHelper.Direction2DFromAngle(RotationAngle, additionalAngle).Y * 10);
     return(Position2D + RotationHelper.Direction2DFromAngle(RotationAngle, additionalAngle) * 6);
 }
Beispiel #6
0
        //private void SetOffSets()
        //{
        //    offsetLeft.Add(new Vector2());


        //}

        /// <summary>
        /// Gets keyboard input of player
        /// </summary>
        private void Controls()
        {
            //Facing();
            //float _RotationAngle = RotationAngle;



            //GM.textM.DrawQuick(FontBank.arcadePixel, RotationHelper.Direction2DFromAngle(RotationAngle,0).ToString(), 200, 400, TextAtt.Centred);
            //GM.textM.DrawQuick(FontBank.arcadePixel, "@@@@", 400, 800, TextAtt.Centred);


            //   GM.textM.DrawQuick(FontBank.arcadePixel, direction, 200, 600, TextAtt.Centred);
            Velocity.X = 0;
            Velocity.Y = 0;
            if (GM.inputM.KeyDown(Keys.Right))
            {
                RotationAngle += rotationSpeed * GM.eventM.Delta;
            }

            if (GM.inputM.KeyDown(Keys.Left))
            {
                RotationAngle -= rotationSpeed * GM.eventM.Delta;
            }

            //GM.textM.DrawQuick(FontBank.arcadePixel, ".",(Position2D.X+RotationHelper.Direction2DFromAngle(RotationAngle,0).X*3), (Position2D.Y + RotationHelper.Direction2DFromAngle(RotationAngle, 0).Y*3), TextAtt.Centred);
            if (GM.inputM.KeyDown(Keys.A))
            {
                //RotationHelper.VelocityInCurrentDirection(this, walkSpeed, -90);
                // Move(walkSpeed, -90);
                if (!level.HitWall(collistionRadius(-90)))
                {
                    //RotationHelper.VelocityInCurrentDirection(this, walkSpeed, 0);
                    Move(walkSpeed, -90);
                }
            }

            if (GM.inputM.KeyDown(Keys.D))
            {
                //RotationHelper.VelocityInCurrentDirection(this, -walkSpeed, -90);
                //Move(walkSpeed, 90);
                if (!level.HitWall(collistionRadius(90)))
                {
                    //RotationHelper.VelocityInCurrentDirection(this, walkSpeed, 0);
                    Move(walkSpeed, 90);
                }
            }

            if (GM.inputM.KeyDown(Keys.W))
            {
                if (!level.HitWall(collistionRadius(0)))
                {
                    //RotationHelper.VelocityInCurrentDirection(this, walkSpeed, 0);
                    Move(walkSpeed, 0);
                }
            }

            if (GM.inputM.KeyDown(Keys.S))
            {
                //RotationHelper.VelocityInCurrentDirection(this, -walkSpeed, 0);
                //Move(-walkSpeed, 0);
                if (!level.HitWall(collistionRadius(180)))
                {
                    //RotationHelper.VelocityInCurrentDirection(this, walkSpeed, 0);
                    Move(-walkSpeed, 0);
                }
            }



            MessageBus.Instance.BroadcastMessage(ExtraMessageTypes.PlayerPosition, Position2D);
            MessageBus.Instance.BroadcastMessage(ExtraMessageTypes.PlayerRotation, RotationHelper.Direction2DFromAngle(RotationAngle, 0));

            //GM.textM.DrawQuick(FontBank.arcadeLarge, RotationHelper.Direction2DFromAngle(RotationAngle, 0).ToString(), 500, 500, TextAtt.Centred);

            //line.
        }