public override void OnStickUpdate(StickInput p_leftStick, StickInput p_rightStick)
 {
     this._lMagnitude = p_leftStick.rawInput.pos.magnitude;
     this._rMagnitude = p_rightStick.rawInput.pos.magnitude;
     PlayerController.Instance.SetLeftIKOffset(p_leftStick.ToeAxis, p_leftStick.ForwardDir, p_leftStick.PopDir, p_leftStick.IsPopStick, true, PlayerController.Instance.GetAnimReleased());
     PlayerController.Instance.SetRightIKOffset(p_rightStick.ToeAxis, p_rightStick.ForwardDir, p_rightStick.PopDir, p_rightStick.IsPopStick, true, PlayerController.Instance.GetAnimReleased());
 }
Example #2
0
 public virtual void OnManualEnterSM(StickInput popStick, StickInput flipStick)
 {
     if (this.m_Logic != null)
     {
         this.m_Logic.OnManualEnter(popStick, flipStick);
     }
 }
 public PlayerState_Setup(StickInput p_popStick, StickInput p_flipStick, bool p_forwardLoad, PlayerController.SetupDir p_setupDir)
 {
     this._popStick    = p_popStick;
     this._flipStick   = p_flipStick;
     this._forwardLoad = p_forwardLoad;
     this._setupDir    = p_setupDir;
 }
Example #4
0
 public virtual void OnNoseManualUpdateSM(StickInput popStick, StickInput flipStick)
 {
     if (this.m_Logic != null)
     {
         this.m_Logic.OnNoseManualUpdate(popStick, flipStick);
     }
 }
Example #5
0
 public virtual void OnStickUpdateSM(StickInput stick1, StickInput stick2)
 {
     if (this.m_Logic != null)
     {
         this.m_Logic.OnStickUpdate(stick1, stick2);
     }
 }
Example #6
0
 public override void OnStickUpdate(StickInput p_leftStick, StickInput p_rightStick)
 {
     PlayerController.Instance.SetLeftIKOffset(p_leftStick.ToeAxis, p_leftStick.ForwardDir, p_leftStick.PopDir, p_leftStick.IsPopStick, true, false);
     PlayerController.Instance.SetRightIKOffset(p_rightStick.ToeAxis, p_rightStick.ForwardDir, p_rightStick.PopDir, p_rightStick.IsPopStick, true, false);
     PlayerController.Instance.SetBoardTargetPosition(0f);
     PlayerController.Instance.SetFrontPivotRotation(0f);
     PlayerController.Instance.SetBackPivotRotation(0f);
     PlayerController.Instance.SetPivotForwardRotation(0f, 40f);
     PlayerController.Instance.SetPivotSideRotation(0f);
     if (this._impactFinished)
     {
         if (p_leftStick.SetupDir > 0.8f || (new Vector2(p_leftStick.ToeAxis, p_leftStick.SetupDir)).magnitude > 0.8f && p_leftStick.SetupDir > 0.325f)
         {
             PlayerController.Instance.AnimSetSetupBlend(0f);
             PlayerController.Instance.animationController.SetValue("EndImpact", true);
             PlayerController.Instance.AnimSetNollie(PlayerController.Instance.GetNollie(false));
             PlayerController.Instance.CrossFadeAnimation("Setup", 0.2f);
             PlayerController.Instance.SetupDirection(p_leftStick, ref this._setupDir);
             object[] pLeftStick = new object[] { p_leftStick, p_rightStick, p_leftStick.ForwardDir > 0.2f, this._setupDir };
             base.DoTransition(typeof(PlayerState_Setup), pLeftStick);
             return;
         }
         if (p_rightStick.AugmentedSetupDir > 0.8f || (new Vector2(p_rightStick.ToeAxis, p_rightStick.SetupDir)).magnitude > 0.8f && p_rightStick.SetupDir > 0.325f)
         {
             PlayerController.Instance.AnimSetSetupBlend(0f);
             PlayerController.Instance.animationController.SetValue("EndImpact", true);
             PlayerController.Instance.AnimSetNollie(PlayerController.Instance.GetNollie(true));
             PlayerController.Instance.CrossFadeAnimation("Setup", 0.2f);
             PlayerController.Instance.SetupDirection(p_rightStick, ref this._setupDir);
             object[] pRightStick = new object[] { p_rightStick, p_leftStick, p_rightStick.ForwardDir > 0.2f, this._setupDir };
             base.DoTransition(typeof(PlayerState_Setup), pRightStick);
         }
     }
 }
Example #7
0
 public override void OnManualEnter(StickInput p_popStick, StickInput p_flipStick)
 {
     PlayerController.Instance.SetManualStrength(1f);
     PlayerController.Instance.AnimSetManual(true, Mathf.Lerp(PlayerController.Instance.AnimGetManualAxis(), p_popStick.ForwardDir, Time.deltaTime * 10f));
     object[] pPopStick = new object[] { p_popStick, p_flipStick, true };
     base.DoTransition(typeof(PlayerState_Manualling), pPopStick);
 }
Example #8
0
 public override void OnStickUpdate(StickInput p_leftStick, StickInput p_rightStick)
 {
     if (p_leftStick.SetupDir > 0.8f || (new Vector2(p_leftStick.ToeAxis, p_leftStick.SetupDir)).magnitude > 0.8f && p_leftStick.SetupDir > 0.325f)
     {
         PlayerController.Instance.SetRightIKWeight(1f);
         PlayerController.Instance.SetRightIKLerpTarget(0f);
         PlayerController.Instance.SetLeftIKWeight(1f);
         PlayerController.Instance.SetLeftIKLerpTarget(0f);
         PlayerController.Instance.AnimSetNollie(PlayerController.Instance.GetNollie(false));
         PlayerController.Instance.SetupDirection(p_leftStick, ref this._setupDir);
         PlayerController.Instance.AnimSetPush(false);
         PlayerController.Instance.AnimSetMongo(false);
         PlayerController.Instance.AnimSetupTransition(true);
         object[] pLeftStick = new object[] { p_leftStick, p_rightStick, p_leftStick.ForwardDir > 0.2f, this._setupDir };
         base.DoTransition(typeof(PlayerState_Setup), pLeftStick);
         return;
     }
     if (p_rightStick.AugmentedSetupDir > 0.8f || (new Vector2(p_rightStick.ToeAxis, p_rightStick.SetupDir)).magnitude > 0.8f && p_rightStick.SetupDir > 0.325f)
     {
         PlayerController.Instance.SetRightIKWeight(1f);
         PlayerController.Instance.SetRightIKLerpTarget(0f);
         PlayerController.Instance.SetLeftIKWeight(1f);
         PlayerController.Instance.SetLeftIKLerpTarget(0f);
         PlayerController.Instance.AnimSetNollie(PlayerController.Instance.GetNollie(true));
         PlayerController.Instance.SetupDirection(p_rightStick, ref this._setupDir);
         PlayerController.Instance.AnimSetupTransition(true);
         PlayerController.Instance.AnimSetPush(false);
         PlayerController.Instance.AnimSetMongo(false);
         object[] pRightStick = new object[] { p_rightStick, p_leftStick, p_rightStick.ForwardDir > 0.2f, this._setupDir };
         base.DoTransition(typeof(PlayerState_Setup), pRightStick);
     }
 }
 public PlayerState_Released(StickInput p_popStick, StickInput p_flipStick, bool p_forwardLoad, float p_invertVel, PlayerController.SetupDir p_setupDir)
 {
     this._popStick    = p_popStick;
     this._flipStick   = p_flipStick;
     this._forwardLoad = p_forwardLoad;
     this._invertVel   = p_invertVel;
     this._setupDir    = p_setupDir;
 }
Example #10
0
 public virtual float GetAugmentedAngleSM(StickInput p_stick)
 {
     if (this.m_Logic == null)
     {
         return(0f);
     }
     return(this.m_Logic.GetAugmentedAngle(p_stick));
 }
 public override float GetAugmentedAngle(StickInput p_stick)
 {
     if (p_stick.IsRightStick)
     {
         return(this._augmentedRightAngle);
     }
     return(this._augmentedLeftAngle);
 }
Example #12
0
 public PlayerState_Pop(StickInput p_popStick, StickInput p_flipStick, bool p_forwardLoad, float p_invertVel, PlayerController.SetupDir p_setupDir, float p_augmentedLeftAngle, float p_augmentedRightAngle, float p_kickAddSoFar)
 {
     this._popStick            = p_popStick;
     this._flipStick           = p_flipStick;
     this._forwardLoad         = p_forwardLoad;
     this._setupDir            = p_setupDir;
     this._augmentedLeftAngle  = p_augmentedLeftAngle;
     this._augmentedRightAngle = p_augmentedRightAngle;
     this._kickAddSoFar        = p_kickAddSoFar;
 }
Example #13
0
 public void OnStickUpdate(StickInput stick1, StickInput stick2)
 {
     for (int i = 0; i < this.m_ChildSMs.Count; i++)
     {
         this.m_ChildSMs[i].OnStickUpdate(stick1, stick2);
     }
     if (this.m_State != null)
     {
         this.m_State.OnStickUpdate(stick1, stick2);
     }
 }
Example #14
0
 public void OnNoseManualUpdate(StickInput popStick, StickInput flipStick)
 {
     for (int i = 0; i < this.m_ChildSMs.Count; i++)
     {
         this.m_ChildSMs[i].OnNoseManualUpdate(popStick, flipStick);
     }
     if (this.m_State != null)
     {
         this.m_State.OnNoseManualUpdate(popStick, flipStick);
     }
 }
Example #15
0
 public override void OnStickUpdate(StickInput p_leftStick, StickInput p_rightStick)
 {
     this.SetupCheck(p_leftStick, p_rightStick);
     PlayerController.Instance.SetLeftIKOffset(p_leftStick.ToeAxis, p_leftStick.ForwardDir, p_leftStick.PopDir, p_leftStick.IsPopStick, false, false);
     PlayerController.Instance.SetRightIKOffset(p_rightStick.ToeAxis, p_rightStick.ForwardDir, p_rightStick.PopDir, p_rightStick.IsPopStick, false, false);
     PlayerController.Instance.SetBoardTargetPosition(0f);
     PlayerController.Instance.SetFrontPivotRotation(0f);
     PlayerController.Instance.SetBackPivotRotation(0f);
     PlayerController.Instance.SetPivotForwardRotation(0f, 40f);
     PlayerController.Instance.SetPivotSideRotation(0f);
 }
Example #16
0
 public override void OnNoseManualUpdate(StickInput p_popStick, StickInput p_flipStick)
 {
     if (!this._wasGrinding)
     {
         PlayerController.Instance.AnimSetNoseManual(true, Mathf.Lerp(PlayerController.Instance.AnimGetManualAxis(), p_popStick.ForwardDir, Time.deltaTime * 10f));
         this._popStick = p_popStick;
         this._flipStick = p_flipStick;
         this._noseManualling = true;
         this._manualling = false;
     }
 }
Example #17
0
 private void Awake()
 {
     this.player      = ReInput.players.GetPlayer(0);
     this._leftStick  = base.gameObject.AddComponent <StickInput>();
     this._rightStick = base.gameObject.AddComponent <StickInput>();
     if (!(InputController._instance != null) || !(InputController._instance != this))
     {
         InputController._instance = this;
         return;
     }
     UnityEngine.Object.Destroy(base.gameObject);
 }
 public override void OnNoseManualUpdate(StickInput p_popStick, StickInput p_flipStick)
 {
     if ((this._caughtLeft || this._caughtRight) && this._canManual)
     {
         this.ForceCatchBoth();
         PlayerController.Instance.AnimSetNoseManual(true, Mathf.Lerp(PlayerController.Instance.AnimGetManualAxis(), p_popStick.ForwardDir, Time.deltaTime * 10f));
         this._popStick       = p_popStick;
         this._flipStick      = p_flipStick;
         this._noseManualling = true;
         this._manualling     = false;
     }
 }
Example #19
0
 public PlayerState_BeginPop(StickInput p_popStick, StickInput p_flipStick, float p_popForce, bool p_wasGrinding, bool p_forwardLoad, float p_invertVel, PlayerController.SetupDir p_setupDir, float p_augmentedLeftAngle, float p_augmentedRightAngle, float p_popVel, float p_toeAxis, float p_popDir)
 {
     this._popStick            = p_popStick;
     this._flipStick           = p_flipStick;
     this._popForce            = p_popForce;
     this._wasGrinding         = p_wasGrinding;
     this._forwardLoad         = p_forwardLoad;
     this._invertVel           = p_invertVel;
     this._setupDir            = p_setupDir;
     this._augmentedLeftAngle  = p_augmentedLeftAngle;
     this._augmentedRightAngle = p_augmentedRightAngle;
     this._popVel  = p_popVel;
     this._toeAxis = p_toeAxis;
     this._popDir  = p_popDir;
 }
Example #20
0
 public float GetAugmentedAngle(StickInput p_stick)
 {
     for (int i = 0; i < this.m_ChildSMs.Count; i++)
     {
         float augmentedAngle = this.m_ChildSMs[i].GetAugmentedAngle(p_stick);
         if (augmentedAngle != 0f)
         {
             return(augmentedAngle);
         }
     }
     if (this.m_State == null)
     {
         return(0f);
     }
     return(this.m_State.GetAugmentedAngle(p_stick));
 }
Example #21
0
 public StickInput GetPopStick()
 {
     for (int i = 0; i < this.m_ChildSMs.Count; i++)
     {
         StickInput popStick = this.m_ChildSMs[i].GetPopStick();
         if (popStick)
         {
             return(popStick);
         }
     }
     if (this.m_State == null)
     {
         return(null);
     }
     return(this.m_State.GetPopStick());
 }
Example #22
0
 public PlayerState_BeginPop(StickInput p_popStick, StickInput p_flipStick, float p_popForce, bool p_forwardLoad, float p_invertVel, PlayerController.SetupDir p_setupDir, float p_augmentedLeftAngle, float p_augmentedRightAngle, float p_popVel, float p_toeAxis, float p_popDir)
 {
     this._popStick            = p_popStick;
     this._flipStick           = p_flipStick;
     this._popForce            = p_popForce;
     this._forwardLoad         = p_forwardLoad;
     this._invertVel           = p_invertVel;
     this._setupDir            = p_setupDir;
     this._augmentedLeftAngle  = p_augmentedLeftAngle;
     this._augmentedRightAngle = p_augmentedRightAngle;
     this._popVel  = p_popVel;
     this._toeAxis = p_toeAxis;
     this._popDir  = p_popDir;
     PlayerController.Instance.animationController.skaterAnim.CrossFadeInFixedTime("Pop", 0.1f);
     PlayerController.Instance.animationController.ikAnim.CrossFadeInFixedTime("Pop", 0.1f);
 }
Example #23
0
 void UpdateStickInputs()
 {
     if (previousStickInput != Stick())
     {
         previousStickInput = latestStickInput;
         chargeWindowTimer += Time.deltaTime;
         if (chargeWindowTimer > chargeWindow)
         {
             chargeTimer       = 0;
             chargeWindowTimer = 0;
         }
     }
     latestStickInput = Stick();
     if (latestStickInput == previousStickInput)
     {
         stickInputTimer += Time.deltaTime;
         if (latestStickInput != StickInput.Neutral)
         {
             chargeTimer += Time.deltaTime;
         }
         if (stickInputTimer >= stickInputWindow)
         {
             if (latestStickInput == StickInput.Neutral)
             {
                 stickInputTimer = 0;
                 stickInputs.Clear();
             }
             RemoveOldestInput();
         }
     }
     if (stickInputs.Count > 0)
     {
         StickInput lastInput = stickInputs[stickInputs.Count - 1];
         if (lastInput == latestStickInput)
         {
             if (previousStickInput != StickInput.Neutral)
             {
                 return;
             }
         }
     }
     if (latestStickInput != StickInput.Neutral)
     {
         AddStickInput();
     }
 }
Example #24
0
 public override float GetAugmentedAngle(StickInput p_stick)
 {
     if (p_stick.PopToeSpeed >= 10f)
     {
         if (p_stick.IsRightStick)
         {
             return(this._augmentedRightAngle);
         }
         return(this._augmentedLeftAngle);
     }
     if (p_stick.IsRightStick)
     {
         if (p_stick.IsPopStick)
         {
             PlayerController.Instance.DebugAugmentedAngles(p_stick.augmentedInput.pos, true);
             this._augmentedRightAngle = PlayerController.Instance.GetAngleToAugment(p_stick.rawInput.pos, true);
             return(PlayerController.Instance.GetAngleToAugment(p_stick.rawInput.pos, true));
         }
         if (PlayerController.Instance.playerSM.GetPopStickSM() == null)
         {
             PlayerController.Instance.DebugAugmentedAngles(p_stick.augmentedInput.pos, true);
             this._augmentedRightAngle = PlayerController.Instance.GetAngleToAugment(p_stick.rawInput.pos, true);
             return(PlayerController.Instance.GetAngleToAugment(p_stick.rawInput.pos, true));
         }
         PlayerController.Instance.DebugAugmentedAngles(p_stick.augmentedInput.pos, false);
         this._augmentedRightAngle = PlayerController.Instance.GetAngleToAugment(p_stick.rawInput.pos, false);
         return(PlayerController.Instance.GetAngleToAugment(p_stick.rawInput.pos, false));
     }
     if (p_stick.IsPopStick)
     {
         PlayerController.Instance.DebugAugmentedAngles(p_stick.augmentedInput.pos, false);
         this._augmentedLeftAngle = PlayerController.Instance.GetAngleToAugment(p_stick.rawInput.pos, false);
         return(PlayerController.Instance.GetAngleToAugment(p_stick.rawInput.pos, false));
     }
     if (PlayerController.Instance.playerSM.GetPopStickSM() == null)
     {
         PlayerController.Instance.DebugAugmentedAngles(p_stick.augmentedInput.pos, false);
         this._augmentedLeftAngle = PlayerController.Instance.GetAngleToAugment(p_stick.rawInput.pos, false);
         return(PlayerController.Instance.GetAngleToAugment(p_stick.rawInput.pos, false));
     }
     PlayerController.Instance.DebugAugmentedAngles(p_stick.augmentedInput.pos, true);
     this._augmentedLeftAngle = PlayerController.Instance.GetAngleToAugment(p_stick.rawInput.pos, true);
     return(PlayerController.Instance.GetAngleToAugment(p_stick.rawInput.pos, true));
 }
Example #25
0
        public StickInput Stick()
        {
            float      stickX = stickPos.x * directionMod;
            StickInput result = StickInput.Neutral;

            if (stickX > .5f && stickPos.y < 0.5f && stickPos.y > -0.5f)
            {
                result = StickInput.Forward;
            }
            else if (stickX > .5f && stickPos.y >= 0.5f)
            {
                result = StickInput.UpForward;
            }
            else if (stickX > .5f && stickPos.y < -0.2f)
            {
                result = StickInput.DownForward;
            }
            else if (stickX < -.5f && stickPos.y < 0.5f && stickPos.y > -0.5f)
            {
                result = StickInput.Back;
            }
            else if (stickX < -.5f && stickPos.y >= 0.5f)
            {
                result = StickInput.UpBack;
            }
            else if (stickX < -.5f && stickPos.y < -0.2f)
            {
                result = StickInput.DownBack;
            }
            else if (stickX > -.5f && stickX < .5f && stickPos.y > 0.5f)
            {
                result = StickInput.Up;
            }
            else if (stickX > -.5f && stickX < .5f && stickPos.y < -.5f)
            {
                result = StickInput.Down;
            }
            else
            {
                result = StickInput.Neutral;
            }
            return(result);
        }
Example #26
0
 public PlayerState_Pop(StickInput p_popStick, StickInput p_flipStick, Vector2 p_initialFlipDir, float p_flipVel, float p_popVel, float p_toeAxis, float p_popDir, bool p_flipDetected, float p_flip, bool p_forwardLoad, float p_invertVel, PlayerController.SetupDir p_setupDir, float p_augmentedLeftAngle, float p_augmentedRightAngle, float p_kickAddSoFar)
 {
     this._popStick            = p_popStick;
     this._flipStick           = p_flipStick;
     this._potentialFlip       = false;
     this._flipDetected        = p_flipDetected;
     this._initialFlipDir      = p_initialFlipDir;
     this._toeAxis             = p_toeAxis;
     this._popDir              = p_popDir;
     this._flipVel             = p_flipVel;
     this._popVel              = p_popVel;
     this._flip                = p_flip;
     this._forwardLoad         = p_forwardLoad;
     this._invertVel           = p_invertVel;
     this._setupDir            = p_setupDir;
     this._augmentedLeftAngle  = p_augmentedLeftAngle;
     this._augmentedRightAngle = p_augmentedRightAngle;
     this._kickAddSoFar        = p_kickAddSoFar;
 }
 public PlayerState_Released(StickInput p_popStick, StickInput p_flipStick, Vector2 p_initialFlipDir, float p_flipVel, float p_popVel, float p_toeAxis, float p_popDir, bool p_flipDetected, float p_flip, bool p_forwardLoad, float p_invertVel, PlayerController.SetupDir p_setupDir, bool p_catchRegistered, bool p_leftCaughtFirst, bool p_rightCaughtFirst)
 {
     this._popStick         = p_popStick;
     this._flipStick        = p_flipStick;
     this._potentialFlip    = false;
     this._flipDetected     = p_flipDetected;
     this._initialFlipDir   = p_initialFlipDir;
     this._toeAxis          = p_toeAxis;
     this._popDir           = p_popDir;
     this._flipVel          = p_flipVel;
     this._popVel           = p_popVel;
     this._flip             = p_flip;
     this._forwardLoad      = p_forwardLoad;
     this._invertVel        = p_invertVel;
     this._setupDir         = p_setupDir;
     this._catchRegistered  = p_catchRegistered;
     this._leftCaughtFirst  = p_leftCaughtFirst;
     this._rightCaughtFirst = p_rightCaughtFirst;
 }
Example #28
0
 private void SetupCheck(StickInput p_leftStick, StickInput p_rightStick)
 {
     if (p_leftStick.SetupDir > 0.8f || (new Vector2(p_leftStick.ToeAxis, p_leftStick.SetupDir)).magnitude > 0.8f && p_leftStick.SetupDir > 0.325f)
     {
         PlayerController.Instance.AnimSetNollie(PlayerController.Instance.GetNollie(false));
         PlayerController.Instance.SetupDirection(p_leftStick, ref this._setupDir);
         object[] pLeftStick = new object[] { p_leftStick, p_rightStick, p_leftStick.ForwardDir > 0.2f, this._setupDir };
         base.DoTransition(typeof(PlayerState_Setup), pLeftStick);
         return;
     }
     if (p_rightStick.AugmentedSetupDir <= 0.8f && ((new Vector2(p_rightStick.ToeAxis, p_rightStick.SetupDir)).magnitude <= 0.8f || p_rightStick.SetupDir <= 0.325f))
     {
         PlayerController.Instance.AnimSetupTransition(false);
         return;
     }
     PlayerController.Instance.AnimSetNollie(PlayerController.Instance.GetNollie(true));
     PlayerController.Instance.SetupDirection(p_rightStick, ref this._setupDir);
     object[] pRightStick = new object[] { p_rightStick, p_leftStick, p_rightStick.ForwardDir > 0.2f, this._setupDir };
     base.DoTransition(typeof(PlayerState_Setup), pRightStick);
 }
 public PlayerState_Manualling(StickInput p_popStick, StickInput p_flipStick, bool p_manual)
 {
     this._popStick  = p_popStick;
     this._flipStick = p_flipStick;
     this._manual    = p_manual;
     if (!PlayerController.Instance.IsSwitch)
     {
         if (this._manual)
         {
             this._manualSign = -1;
             return;
         }
         this._manualSign = 1;
         return;
     }
     if (this._manual)
     {
         this._manualSign = 1;
         return;
     }
     this._manualSign = -1;
 }
Example #30
0
    public override void OnStickUpdate(StickInput p_leftStick, StickInput p_rightStick)
    {
        float single;
        float single1;

        if (SettingsManager.Instance.stance != SettingsManager.Stance.Regular)
        {
            switch (SettingsManager.Instance.controlType)
            {
            case SettingsManager.ControlType.Same:
            {
                if (PlayerController.Instance.CanOllieOutOfGrind() && PlayerController.Instance.CanNollieOutOfGrind())
                {
                    if (p_leftStick.PopToeSpeed > 8f)
                    {
                        if (this._popStick != p_leftStick)
                        {
                            this._popStick = p_leftStick;
                        }
                        this._flipStick = p_rightStick;
                    }
                    if (p_rightStick.PopToeSpeed <= 8f)
                    {
                        break;
                    }
                    if (this._popStick != p_rightStick)
                    {
                        this._popStick = p_rightStick;
                    }
                    this._flipStick = p_leftStick;
                    break;
                }
                else if (!PlayerController.Instance.CanOllieOutOfGrind())
                {
                    if (!PlayerController.Instance.CanNollieOutOfGrind())
                    {
                        break;
                    }
                    if (this._popStick != p_rightStick)
                    {
                        this._popStick = p_rightStick;
                    }
                    this._flipStick = p_leftStick;
                    break;
                }
                else
                {
                    if (this._popStick != p_leftStick)
                    {
                        this._popStick = p_leftStick;
                    }
                    this._flipStick = p_rightStick;
                    break;
                }
            }

            case SettingsManager.ControlType.Swap:
            {
                if (!PlayerController.Instance.IsSwitch)
                {
                    if (PlayerController.Instance.CanOllieOutOfGrind() && PlayerController.Instance.CanNollieOutOfGrind())
                    {
                        if (p_leftStick.PopToeSpeed > 8f)
                        {
                            if (this._popStick != p_leftStick)
                            {
                                this._popStick = p_leftStick;
                            }
                            this._flipStick = p_rightStick;
                        }
                        if (p_rightStick.PopToeSpeed <= 8f)
                        {
                            break;
                        }
                        if (this._popStick != p_rightStick)
                        {
                            this._popStick = p_rightStick;
                        }
                        this._flipStick = p_leftStick;
                        break;
                    }
                    else if (!PlayerController.Instance.CanOllieOutOfGrind())
                    {
                        if (!PlayerController.Instance.CanNollieOutOfGrind())
                        {
                            break;
                        }
                        if (this._popStick != p_rightStick)
                        {
                            this._popStick = p_rightStick;
                        }
                        this._flipStick = p_leftStick;
                        break;
                    }
                    else
                    {
                        if (this._popStick != p_leftStick)
                        {
                            this._popStick = p_leftStick;
                        }
                        this._flipStick = p_rightStick;
                        break;
                    }
                }
                else if (PlayerController.Instance.CanOllieOutOfGrind() && PlayerController.Instance.CanNollieOutOfGrind())
                {
                    if (p_leftStick.PopToeSpeed > 8f)
                    {
                        if (this._popStick != p_leftStick)
                        {
                            this._popStick = p_leftStick;
                        }
                        this._flipStick = p_rightStick;
                    }
                    if (p_rightStick.PopToeSpeed <= 8f)
                    {
                        break;
                    }
                    if (this._popStick != p_rightStick)
                    {
                        this._popStick = p_rightStick;
                    }
                    this._flipStick = p_leftStick;
                    break;
                }
                else if (!PlayerController.Instance.CanOllieOutOfGrind())
                {
                    if (!PlayerController.Instance.CanNollieOutOfGrind())
                    {
                        break;
                    }
                    if (this._popStick != p_leftStick)
                    {
                        this._popStick = p_leftStick;
                    }
                    this._flipStick = p_rightStick;
                    break;
                }
                else
                {
                    if (this._popStick != p_rightStick)
                    {
                        this._popStick = p_rightStick;
                    }
                    this._flipStick = p_leftStick;
                    break;
                }
            }

            case SettingsManager.ControlType.Simple:
            {
                if (PlayerController.Instance.CanOllieOutOfGrind() && PlayerController.Instance.CanNollieOutOfGrind())
                {
                    if (p_leftStick.PopToeSpeed > 8f)
                    {
                        if (this._popStick != p_leftStick)
                        {
                            this._popStick = p_leftStick;
                        }
                        this._flipStick = p_rightStick;
                    }
                    if (p_rightStick.PopToeSpeed <= 8f)
                    {
                        break;
                    }
                    if (this._popStick != p_rightStick)
                    {
                        this._popStick = p_rightStick;
                    }
                    this._flipStick = p_leftStick;
                    break;
                }
                else if (!PlayerController.Instance.CanOllieOutOfGrind())
                {
                    if (!PlayerController.Instance.CanNollieOutOfGrind())
                    {
                        break;
                    }
                    if (this._popStick != p_leftStick)
                    {
                        this._popStick = p_leftStick;
                    }
                    this._flipStick = p_rightStick;
                    break;
                }
                else
                {
                    if (this._popStick != p_rightStick)
                    {
                        this._popStick = p_rightStick;
                    }
                    this._flipStick = p_leftStick;
                    break;
                }
            }
            }
        }
        else
        {
            switch (SettingsManager.Instance.controlType)
            {
            case SettingsManager.ControlType.Same:
            {
                if (PlayerController.Instance.CanOllieOutOfGrind() && PlayerController.Instance.CanNollieOutOfGrind())
                {
                    if (p_leftStick.PopToeSpeed > 8f)
                    {
                        if (this._popStick != p_leftStick)
                        {
                            this._popStick = p_leftStick;
                        }
                        this._flipStick = p_rightStick;
                    }
                    if (p_rightStick.PopToeSpeed <= 8f)
                    {
                        break;
                    }
                    if (this._popStick != p_rightStick)
                    {
                        this._popStick = p_rightStick;
                    }
                    this._flipStick = p_leftStick;
                    break;
                }
                else if (!PlayerController.Instance.CanOllieOutOfGrind())
                {
                    if (!PlayerController.Instance.CanNollieOutOfGrind())
                    {
                        break;
                    }
                    if (this._popStick != p_leftStick)
                    {
                        this._popStick = p_leftStick;
                    }
                    this._flipStick = p_rightStick;
                    break;
                }
                else
                {
                    if (this._popStick != p_rightStick)
                    {
                        this._popStick = p_rightStick;
                    }
                    this._flipStick = p_leftStick;
                    break;
                }
            }

            case SettingsManager.ControlType.Swap:
            {
                if (!PlayerController.Instance.IsSwitch)
                {
                    if (PlayerController.Instance.CanOllieOutOfGrind() && PlayerController.Instance.CanNollieOutOfGrind())
                    {
                        if (p_leftStick.PopToeSpeed > 8f)
                        {
                            if (this._popStick != p_leftStick)
                            {
                                this._popStick = p_leftStick;
                            }
                            this._flipStick = p_rightStick;
                        }
                        if (p_rightStick.PopToeSpeed <= 8f)
                        {
                            break;
                        }
                        if (this._popStick != p_rightStick)
                        {
                            this._popStick = p_rightStick;
                        }
                        this._flipStick = p_leftStick;
                        break;
                    }
                    else if (!PlayerController.Instance.CanOllieOutOfGrind())
                    {
                        if (!PlayerController.Instance.CanNollieOutOfGrind())
                        {
                            break;
                        }
                        if (this._popStick != p_leftStick)
                        {
                            this._popStick = p_leftStick;
                        }
                        this._flipStick = p_rightStick;
                        break;
                    }
                    else
                    {
                        if (this._popStick != p_rightStick)
                        {
                            this._popStick = p_rightStick;
                        }
                        this._flipStick = p_leftStick;
                        break;
                    }
                }
                else if (PlayerController.Instance.CanOllieOutOfGrind() && PlayerController.Instance.CanNollieOutOfGrind())
                {
                    if (p_leftStick.PopToeSpeed > 8f)
                    {
                        if (this._popStick != p_leftStick)
                        {
                            this._popStick = p_leftStick;
                        }
                        this._flipStick = p_rightStick;
                    }
                    if (p_rightStick.PopToeSpeed <= 8f)
                    {
                        break;
                    }
                    if (this._popStick != p_rightStick)
                    {
                        this._popStick = p_rightStick;
                    }
                    this._flipStick = p_leftStick;
                    break;
                }
                else if (!PlayerController.Instance.CanOllieOutOfGrind())
                {
                    if (!PlayerController.Instance.CanNollieOutOfGrind())
                    {
                        break;
                    }
                    if (this._popStick != p_rightStick)
                    {
                        this._popStick = p_rightStick;
                    }
                    this._flipStick = p_leftStick;
                    break;
                }
                else
                {
                    if (this._popStick != p_leftStick)
                    {
                        this._popStick = p_leftStick;
                    }
                    this._flipStick = p_rightStick;
                    break;
                }
            }

            case SettingsManager.ControlType.Simple:
            {
                if (PlayerController.Instance.CanOllieOutOfGrind() && PlayerController.Instance.CanNollieOutOfGrind())
                {
                    if (p_leftStick.PopToeSpeed > 8f)
                    {
                        if (this._popStick != p_leftStick)
                        {
                            this._popStick = p_leftStick;
                        }
                        this._flipStick = p_rightStick;
                    }
                    if (p_rightStick.PopToeSpeed <= 8f)
                    {
                        break;
                    }
                    if (this._popStick != p_rightStick)
                    {
                        this._popStick = p_rightStick;
                    }
                    this._flipStick = p_leftStick;
                    break;
                }
                else if (!PlayerController.Instance.CanOllieOutOfGrind())
                {
                    if (!PlayerController.Instance.CanNollieOutOfGrind())
                    {
                        break;
                    }
                    if (this._popStick != p_leftStick)
                    {
                        this._popStick = p_leftStick;
                    }
                    this._flipStick = p_rightStick;
                    break;
                }
                else
                {
                    if (this._popStick != p_rightStick)
                    {
                        this._popStick = p_rightStick;
                    }
                    this._flipStick = p_leftStick;
                    break;
                }
            }
            }
        }
        if (this._popStick != null && this._flipStick != null)
        {
            this._forwardLoad = PlayerController.Instance.GetNollie(this._popStick.IsRightStick) > 0.1f;
            PlayerController.Instance.AnimSetNollie(PlayerController.Instance.GetNollie(this._popStick.IsRightStick));
            PlayerController instance      = PlayerController.Instance;
            StickInput       stickInput    = this._popStick;
            bool             flag          = this._forwardLoad;
            ref float        singlePointer = ref this._invertVel;
            single = (this._popStick.IsRightStick ? this._augmentedRightAngle : this._augmentedLeftAngle);
            instance.OnPopStartCheck(true, stickInput, ref this._setupDir, flag, 15f, ref singlePointer, single, ref this._popVel);
            PlayerController playerController = PlayerController.Instance;
            ref bool         flagPointer      = ref this._potentialFlip;