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)); }
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; }
public StatisticsActor(Core core, int score) : base(core, 0, 0) { width = 113; height = 57; x = Consts.ScreenWidth/2 - width/2; y = 100; boardSprite = new Sprite(new Rectangle(146, 58, width, height)); scoreActor = new ScoreActor(core, 110, 117, score); maxScoreActor = new ScoreActor(core, 110, 137, Consts.MaxScore); }
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; }