public EntitiesView(ContentManager content, SpriteBatch spriteBatch, EntityAnimations animations, ParticleFactory particleFactory, SoundEffects soundEffects) { _spriteBatch = spriteBatch; _animations = animations; _particleFactory = particleFactory; _soundEffects = soundEffects; _defaultTexture = content.Load <Texture2D>("Textures/Torch"); }
public EntityView(int entityID, EntityViewProfile profile, Texture2D texture, EntityAnimations animations, ParticleFactory particleFactory, SoundEffects soundEffects) { _entityID = entityID; _profile = profile; _sprite = new Sprite(texture); _animations = animations; _particleFactory = particleFactory; _soundEffects = soundEffects; }
public LevelView(GraphicsDevice graphicsDevice, ContentManager content, SpriteBatch spriteBatch, IRenderTargetStack renderTargetStack, BackgroundView backgroundView, TileMapView tileMapView, EntitiesView entitiesView, WaterView waterView, ParticlesView particlesView, ParticleFactory particleFactory) { _graphicsDevice = graphicsDevice; _spriteBatch = spriteBatch; _renderTargetStack = renderTargetStack; Background = backgroundView; TileMap = tileMapView; Entities = entitiesView; Particles = particlesView; _particleFactory = particleFactory; _waterView = waterView; _waterEffect = content.Load <Effect>("Effects/Water"); _flowMapTexture = content.Load <Texture2D>("Textures/FlowMap"); _pixelTexture = content.Load <Texture2D>("Textures/Pixel"); _arrowTexture = content.Load <Texture2D>("Textures/TorchArrow"); _finishTexture = content.Load <Texture2D>("Textures/Finish"); _progressTexture = content.Load <Texture2D>("Textures/Progress"); _playerIconTexture = content.Load <Texture2D>("Textures/PlayerIcon"); _torchIconTexture = content.Load <Texture2D>("Textures/TorchIcon"); _gradientTexture = content.Load <Texture2D>("Textures/Gradient"); _regularFont = content.Load <SpriteFont>("Fonts/Regular"); _worldTarget = CreateRenderTarget(); _waterTarget = CreateRenderTarget(); _waterEffect.Parameters["WaterMaskSampler+WaterMask"].SetValue(_waterTarget); _waterEffect.Parameters["FlowMapSampler+FlowMap"].SetValue(_flowMapTexture); _waterEffect.Parameters["WaterColor"].SetValue(new Color(152, 163, 152).ToVector4()); _arrowSprite = new Sprite(_arrowTexture) { Origin = _arrowTexture.Bounds.Center.ToVector2() }; Entities.Particles = Particles; }