private void generateLives() { this.lives = new FrogSprite[this.gameManager.Lives]; for (var i = 0; i < this.gameManager.Lives; i++) { var life = new FrogSprite(); var xLocation = i * (life.Width + 5); life.RenderAt(xLocation, 0); this.canvas.Children.Add(life); this.lives[i] = life; this.createVisibleClock(); } }
private void generateLandingSpotFrogs() { this.landingSpots = new Dictionary <LilyPad, FrogSprite>(); foreach (var t in this.gameManager.GetFrogHomes()) { var newLandingSpotFrog = new FrogSprite { Visibility = Visibility.Collapsed }; VisualStateManager.GoToState(newLandingSpotFrog, "Spinning", true); var xLocation = t.HitBox.X; var yLocation = t.HitBox.Y; newLandingSpotFrog.RenderAt(xLocation, yLocation); this.canvas.Children.Add(newLandingSpotFrog); this.landingSpots.Add(t, newLandingSpotFrog); } }