Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var dalmatian = new Dog
            {
                name    = "Tilde",
                price   = 200,
                color   = "White and black",
                species = "Dalmatian"
            };
            var cockatoo = new Parrot
            {
                name    = "Charlie",
                price   = 75,
                color   = "Grey",
                species = "Cockatoo"
            };
            var anaconda = new Snake
            {
                name    = "Nagini",
                price   = 150,
                color   = "Green/Brown",
                species = "Anaconda"
            };

            var dogBowl = new FoodBowl
            {
                name       = "Food bowl for dogs",
                price      = 50,
                color      = "Metallic Grey",
                brandName  = "AnimalsBFF",
                animalType = "Dogs"
            };
            var birdBowl = new FoodBowl
            {
                name       = "Food bowl for birds",
                price      = 25,
                color      = "Metallic Grey",
                brandName  = "AnimalsBFF",
                animalType = "Birds"
            };
            var snakeBowl = new FoodBowl
            {
                name       = "Food bowl for snakes",
                price      = 25,
                color      = "Metallic Grey",
                brandName  = "AnimalsBFF",
                animalType = "Snakes"
            };

            productsList.AddRange(new Products[] { dalmatian, cockatoo, anaconda, dogBowl, birdBowl, snakeBowl });//products added to the shops inventory

            while (true)
            {
                mainMenu();
            }
        }
Exemplo n.º 2
0
        public World()
        {
            _spVerdana = Game1.instance.Content.Load <SpriteFont>("Verdana");

            _bowl = new FoodBowl(new Vector2(0, 0));

            _gameobjects.Add(new Cat(new Vector2(70, 170), _bowl));
            _gameobjects.Add(new Cat(new Vector2(150, 50), _bowl));
            _gameobjects.Add(new Cat(new Vector2(350, 170), _bowl));
            _gameobjects.Add(new Cat(new Vector2(200, 300), _bowl));


            _gameobjects.Add(_bowl);
        }
Exemplo n.º 3
0
 public Cat(Vector2 position, FoodBowl bowl) : base(position)
 {
     _bowl        = bowl;
     catBehaviour = new Sleeping(this);
 }