예제 #1
0
파일: Bird.cs 프로젝트: tama124/FlappyBird
 public override void Update(RenderContext renderContext, Land land, PipeList pipes)
 {
     fly(renderContext);
     checkCollision(renderContext, land, pipes);
     animateSprite(renderContext);
     base.Update(renderContext);
 }
예제 #2
0
        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();
        }
예제 #3
0
 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);
 }