public Tank(GraphicsDevice graphicsDevice, VertexPositionNormalTexture[] vert, int larguraMapa, Vector3 position, bool playerControl, ContentManager content) { scale = 0.005f; this.content = content; //world = Matrix.CreateScale(0.01f); this.playerControl = playerControl; if (playerControl) { velocidade = 0.2f; } else { velocidade = 0.07f; } device = graphicsDevice; Teffect = new BasicEffect(device); Teffect.VertexColorEnabled = true; this.position = position; positionCamera = position; vertices = vert; this.larguraMapa = larguraMapa; vetorBase = new Vector3(1, 0, 0); direcao = vetorBase; target = position + direcao; world = Matrix.CreateScale(0.005f) * Matrix.CreateTranslation(position); view = Matrix.CreateLookAt(new Vector3(0, 10, 10), Vector3.Zero, Vector3.Up); firstUpdate = true; boundingSphere = new BoundingSphere(); boundingSphere.Radius = 3f; //lista de balas velocidadeMaxima = 0.005f; //particulas sistemaParticulasTraseira = new SistemaParticulas(device, this.position, 2.8f, 0.5f, this.world); sistemaParticulasTraseiraEnabled = false; tankDestroyed = false; }
public Tank(GraphicsDevice graphicsDevice, VertexPositionNormalTexture[] vert, int larguraMapa, Vector3 position, bool playerControl, ContentManager content) { scale = 0.005f; this.content = content; //world = Matrix.CreateScale(0.01f); this.playerControl = playerControl; if (playerControl) { velocidade = 0.2f; } else { velocidade = 0.07f; } device = graphicsDevice; Teffect = new BasicEffect(device); Teffect.VertexColorEnabled = true; this.position = position; positionCamera = position; vertices = vert; this.larguraMapa = larguraMapa; vetorBase = new Vector3(1, 0, 0); direcao = vetorBase; target = position + direcao; world = Matrix.CreateScale(0.005f) * Matrix.CreateTranslation(position); view = Matrix.CreateLookAt(new Vector3(0, 10, 10), Vector3.Zero, Vector3.Up); firstUpdate = true; boundingSphere = new BoundingSphere(); boundingSphere.Radius = 3f; //lista de balas velocidadeMaxima = 0.005f; //particulas sistemaParticulasTraseira = new SistemaParticulas(device,this.position, 2.8f, 0.5f, this.world); sistemaParticulasTraseiraEnabled = false; tankDestroyed = false; }