public PathRenderer(ConnectedSwapBlock block)
     : base(block.Position)
 {
     this.block = block;
     Depth      = Depths.BGDecals - 1;
     timer      = Calc.Random.NextFloat();
 }
        public override void LoadContent(bool firstLoad)
        {
            _SpriteBank = new SpriteBank(GFX.Game, "Graphics/CommunalHelper/Sprites.xml");

            StationBlock.InitializeParticles();
            StationBlockTrack.InitializeTextures();
            TrackSwitchBox.InitializeParticles();

            DreamTunnelRefill.InitializeParticles();
            DreamTunnelDash.InitializeParticles();

            DreamMoveBlock.InitializeParticles();
            DreamSwitchGate.InitializeParticles();

            ConnectedMoveBlock.InitializeTextures();
            ConnectedSwapBlock.InitializeTextures();

            HeartGemShard.InitializeParticles();

            Melvin.InitializeTextures();
            Melvin.InitializeParticles();

            RailedMoveBlock.InitializeTextures();
            DreamBooster.InitializeParticles();

            DreamJellyfish.InitializeTextures();
            DreamJellyfish.InitializeParticles();

            Chain.InitializeTextures();
        }
        /*
         * Appears to set the player to its climbing state (player.StateMachine.State = 1),
         * therefore cancelling the dash, and resetting the speed back to Vector.Zero.
         * Does that if the Connected Swap Blocks and the player are moving in the same direction (?)
         * (swapBlock.Direction.X == Math.Sign(player.DashDir.X))
         */
        private static bool Player_ClimbConnectedSwapBlockCheck(Player player)
        {
            ConnectedSwapBlock swapBlock = player.CollideFirst <ConnectedSwapBlock>(player.Position + Vector2.UnitX * Math.Sign(player.DashDir.X));

            if (swapBlock != null && swapBlock.Direction.X == Math.Sign(player.DashDir.X))
            {
                player.StateMachine.State = 1;
                player.Speed = Vector2.Zero;
                return(true);
            }
            return(false);
        }
 public ConnectedSwapBlockBGTilesRenderer(ConnectedSwapBlock block)
 {
     this.block = block;
     Depth      = Depths.Player + 1;
 }