public Terrain(Game1 game, float startAngle, double terrianHeight, bool hasFly) : base(game) { this.game = game; angle = startAngle; tHeight = terrianHeight; Random r = new Random(); float flyOffset = (float)r.NextDouble() * 0.055f; // max offfset angle if (hasFly) { fly = new Fly(game, startAngle + flyOffset, this); } isOnScreen = false; }
//////////////////////////////////////////////////////////////////////////////////////////////////////////// internal void flyCollided(Fly fly) { if (isCrouching) return; fly.terrain.fly = null; scale += 0.01f; scoreDisplay.currentPoints += 100; scoreDisplay.currentSize = (int)(scale * 1000); }