Exemple #1
0
        public Tree(Location location, double rotation) : base(location, rotation)
        {
            var rand = GameWorld.Instance.Random;

            TreeStumpRadius = 5f;
            food            = 100;
            Color           = Color.FromArgb(125, 77, 158 + rand.Next(-25, 25), 58);
            treeTops        = new ObstacleCircle[3];
            CollisionCircles.Add(new ObstacleCircle(location, TreeStumpRadius));
            for (int i = 0; i < treeTops.Length; i++)
            {
                Location       treetopLocation = new Location(location.X + rand.Next(-10, 10), location.Y + rand.Next(-10, 10));
                ObstacleCircle treetop         = new ObstacleCircle(treetopLocation, 30 + rand.Next(-10, 5));
                treeTops[i] = treetop;
            }
        }
Exemple #2
0
 public Rock(Location location, double rotation) : base(location, rotation)
 {
     CollisionCircles.Add(new ObstacleCircle(Location, 10));
 }