SmashBros.Controllers.CharacterController.SuperKeyDown C# (CSharp) Method

SuperKeyDown() private method

private SuperKeyDown ( float directionX, float directionY, float downTimer, int playerIndex ) : void
directionX float
directionY float
downTimer float
playerIndex int
return void
        private void SuperKeyDown(float directionX, float directionY, float downTimer, int playerIndex)
        {
            if (model.resetTimeLeft <= 0)
            {
                if (!model.attackMode)
                {
                    MoveStats moveStats;
                    if (navigation.X == 0 && navigation.Y == 0)
                    {
                        moveStats = stats.x;
                    }
                    else if (Math.Abs(navigation.X) > Math.Abs(navigation.Y))
                    {
                        moveStats = stats.xLR;
                        model.faceRight = navigation.X > 0;
                    }
                    else if (navigation.Y > 0) moveStats = stats.xDown;
                    else if (model.jumpsLeft > 0)
                    {
                        moveStats = stats.xUp;
                        model.jumpsLeft = 0;
                    }
                    else return;

                    if (moveStats != null)
                    {
                        currentMove = moves.newMove(moveStats, model.faceRight);
                        if (currentMove == null) return;
                        if (currentMove.Stats.Type == MoveType.Charge)
                        {
                            model.setState(CharacterState.charging);
                        }
                        else
                        {
                            model.setState(CharacterState.attacking, currentMove.Stats);
                            if (currentMove.Stats.Start == 0) moves.StartMove(view.Position, view.Velocity, currentMove);
                            if (currentMove.Stats.Adjustable) adjustAngle = model.faceRight ? currentMove.Stats.StartAngle : Math.PI - currentMove.Stats.StartAngle;
                        }
                    }
                }
                else if (currentMove.Stats.Adjustable && currentMove.attackTimeLeft <= 0)
                {
                    model.attackMode = false;
                    NaturalState();
                }
            }
        }