Пример #1
0
 public Game1()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     randomizer            = new Randomizer(1976);
 }
        public CreatureManager(WorldManager world)
        {
            Random rnd = Randomizer.GetRandomizer();

            creatures    = new List <Creature>();
            effects      = new List <Effect>();
            worldManager = world;

            worldStates = new WorldStates(world, creatures);
            for (int i = 0; i < 3; i++)
            {
                Creature c = new Creature(this)
                {
                    Name  = "GOAP agent",
                    X_pos = 25,
                    Y_pos = i * 2,
                };
                c.controller = new SoldierController(c);
                c.controller.Initialize();
                c.controller.CreateBody();
                creatures.Add(c);
            }

            //                 REMOVE CREAURE GENERATION HERE FOR A WHILE

            /*
             * for (int i = 0; i < 3; i++)
             * {
             *  Creature c = new Creature(this)
             *  {
             *      Name = "ZombiDude",
             *      X_pos = 5,
             *      Y_pos = i,
             *  };
             *  c.controller = new ZombieController(c);
             *  c.controller.Initialize();
             *  c.controller.CreateBody();
             *  creatures.Add(c);
             * }
             *
             * for (int i = 0; i < 5; i++)
             * {
             *  Creature v = new Creature(this)
             *  {
             *      Name = "Vicar #" + i.ToString(),
             *      X_pos = 40,
             *      Y_pos = i
             *  };
             *  v.controller = new VicarController(v);
             *  v.controller.Initialize();
             *  v.controller.CreateBody();
             *  creatures.Add(v);
             * }
             *
             * Creature b = new Creature(this)
             * {
             *  Name = "Vicar with bomb",
             *  X_pos = 42,
             *  Y_pos = 3
             * };
             * b.controller = new VicarController(b);
             * b.controller.Initialize();
             * b.controller.CreateBody();
             * Attack fragmentation_grenade = new Attack() { name = "Frag grenade", attack_damage = 5, effect = EffectTypes.BLAST };
             * b.Inventory.AddItem(new Item("Holy Handgranade of Antioc", fragmentation_grenade, 15));
             * creatures.Add(b);
             */
        }