Beispiel #1
0
        ////////////////

        private static void RunFinalDashIf(SpiritWalkingPlayer myplayer)
        {
            if (myplayer.FinalDashElapsed <= 0)
            {
                return;
            }

            int chargeTime = 90;

            SpiritWalkFxLogic.EmitSpiritTrailParticles(
                position: myplayer.player.MountedCenter,
                direction: Vector2.One.RotatedByRandom(Math.PI) * 5f
                //particles: 1
                //wide: true
                //offsetY: 0
                );

            if (myplayer.FinalDashElapsed >= chargeTime)
            {
                myplayer.FinalDashElapsed = 0;

                SpiritWalkLogic.AttemptFinalDash(myplayer, true);

                SpiritWalkLogic.DeactivateIf(myplayer.player, true);
            }
            else
            {
                myplayer.FinalDashElapsed++;
            }
        }
Beispiel #2
0
        ////////////////

        public static void Update(SpiritWalkingPlayer myplayer, bool isSpiritWalking)
        {
//DebugLibraries.Print( "walk?", ""+isSpiritWalking+", "+myplayer.player.width+", "+myplayer.player.height );
            if (!isSpiritWalking)
            {
                return;
            }

            bool canSW = SpiritWalkLogic.CanSpiritWalk(myplayer.player);

            if (canSW)
            {
                SpiritWalkLogic.UpdateForSpiritWalk(myplayer);
            }
            else
            {
                SpiritWalkLogic.DeactivateIf(myplayer.player, true);
            }

            SpiritWalkFxLogic.Update(myplayer, canSW);
        }