Exemple #1
0
        private void SpawnRacoon()
        {
            Racoon racoon = new Racoon(Textures.RacoonTex, level, level.Plankwaypoints_left.Peek(), 10, 40, 3, 9, 1);

            racoon.SetWayPoints(level.Plankwaypoints_left);
            racoons.Add(racoon);
            spawnTimer = 0;
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Zoo     zoo        = new Zoo();
            iAnimal milacha    = new Panda();
            iAnimal someGrizly = new Bear();
            iAnimal rocket     = new Racoon();

            zoo.AddToZooparck(milacha);
            zoo.AddToZooparck(someGrizly);
            zoo.AddToZooparck(rocket);
        }
Exemple #3
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.tag == "FoodCollector")
     {
         collectedFruit = true;
         Racoon racoon = other.GetComponentInParent <Racoon>();
         racoon.AddCalories(calories);
         Debug.Log(racoon.getWeight());
         Destroy(this.gameObject);
     }
 }
Exemple #4
0
        public void Update(GameTime gameTime)
        {
            //spawnen en verwijderen van de racoons
            if (spawing_racoons)
            {
                spawnTimer += (float)gameTime.ElapsedGameTime.TotalSeconds;
                if (spawnTimer > 20)
                {
                    SpawnRacoon();
                }
            }

            for (int i = 0; i < racoons.Count; i++)
            {
                Racoon racoon = racoons[i];
                racoon.Update(gameTime);

                if (racoon.IsDead)
                {
                    racoons.Remove(racoon);
                    i--;
                }
            }
        }
 private void SpawnRacoon()
 {
     Racoon racoon = new Racoon(Textures.RacoonTex, level, level.Plankwaypoints_left.Peek(),10,40,3, 9, 1);
     racoon.SetWayPoints(level.Plankwaypoints_left);
     racoons.Add(racoon);
     spawnTimer = 0;
 }