public override void Update(RenderContext renderContext, Land land, PipeList pipes) { fly(renderContext); checkCollision(renderContext, land, pipes); animateSprite(renderContext); base.Update(renderContext); }
protected override void Initialize() { // Create all Sprites objects renderContext = new RenderContext(); scope = 0; _background = new Background("Background"); _bird = new Bird("Bird", new Vector2(50, 350), 50, 79); _land = new Land("Land", 142, this.GraphicsDevice.Viewport.Height); _pipes = new PipeList("Pipe"); _font = new Font("Font", scope.ToString(), new Vector2(50, 125)); base.Initialize(); }
public virtual void Update(RenderContext renderContext, Land land, PipeList pipes) { _position += _velocity * direction; bound.X = (int)(_position.X - _center.X); bound.Y = (int)(_position.Y - _center.Y); }