public void Draw(Camera camera) { graphicDevice.SetVertexBuffer(particleVertexBuffer); for (int i = 0; i < maxParticles; ++i) { particleEffect.Parameters["WorldViewProjection"].SetValue(camera.view * camera.projection); particleEffect.Parameters["particleColor"].SetValue(vertexColorArray[i].ToVector4()); foreach (EffectPass pass in particleEffect.CurrentTechnique.Passes) { pass.Apply(); graphicDevice.DrawUserPrimitives<VertexPositionTexture>(PrimitiveType.TriangleStrip,verts,i*4,2); } } }
protected override void Initialize() { Window.Title = "Project 2"; base.Initialize(); camera = new Camera(this,main); }
private void initializeComponents() { camera = new Camera(this, new Vector3(50, 0, 0), new Vector3(0.001f, 0.0f, -1.0f), 1.0f, worldRadius * 2, Vector3.Up); Component.Drawable3D.init(this); Component.Drawable2D.init(this,targetingFont); Component.DrawableString.init(Drawable2D.spriteManager); Component.Collidable.init(this); spriteManager = new SpriteManager(this); pauseMenu = new PauseMenu(this); }
public Intro(Game game, Player player, Camera camera) : base(game) { player.removeComponent<Controllable>(); }