Example #1
0
        public MenuState(Core core)
            : base(core)
        {
            skyLineActor = new SkyLineActor(core);
              groundActor = new GroundActor(core);
              birdActor = new FreeBirdActor(core, Consts.ScreenWidth / 2 - 10, Consts.ScreenHeight / 2 - 25);

              titleSprite = new Sprite(new Rectangle(146, 173, 96, 22));
        }
Example #2
0
        public GetReadyState(Core core)
            : base(core)
        {
            skyLineActor = new SkyLineActor(core);
              groundActor = new GroundActor(core);
              birdActor = new FreeBirdActor(core, 30, Consts.ScreenHeight / 2 - 10);
              scoreActor = new ScoreActor(core, Consts.ScreenWidth / 2, 25);

              getReadySprite = new Sprite(new Rectangle(146, 221, 87, 22));
        }
Example #3
0
        public ActionState(Core core, BirdActor birdActor, GroundActor groundActor, ScoreActor scoreActor)
            : base(core)
        {
            skyLineActor = new SkyLineActor(core);
              this.groundActor = new GroundActor(core, groundActor.x);
              this.birdActor = new PlayerBirdActor(core, birdActor.x, birdActor.y);
              pipeActors = new List<PipeActor>();
              this.scoreActor = scoreActor;

              this.birdActor.OnKeyPress(Key.Space);

              nextPipeTick = 100;
              ticks = 0;
        }
Example #4
0
        public GameOverState(Core core, BirdActor birdActor, GroundActor groundActor, List<PipeActor> pipeActors, ScoreActor scoreActor)
            : base(core)
        {
            gameOverSprite = new Sprite(new Rectangle(146, 199, 94, 19));

              skyLineActor = new SkyLineActor(core);
              this.groundActor = groundActor;
              this.pipeActors = pipeActors;
              this.birdActor = birdActor;
              this.scoreActor = scoreActor;

              if (scoreActor.score > Consts.MaxScore)
              {
            Consts.MaxScore = scoreActor.score;
              }

              statisticsActor = new StatisticsActor(core, scoreActor.score);

              stressTtl = 11;
        }