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(); }
public override void OnEnter(Player player) { base.OnEnter(player); if (oneUse) { Collidable = false; } TrackSwitchState state = Mode switch { Modes.On => TrackSwitchState.On, Modes.Off => TrackSwitchState.Off, _ => TrackSwitchBox.LocalTrackSwitchState.Invert() }; // switches bool switched = TrackSwitchBox.Switch(Scene, state, global); if (flash && switched) { Pulse(); } }