Exemplo n.º 1
0
        public ZombieAI(Creature owner) : base(owner)
        {
            rnd = Randomizer.GetRandomizer();

            state           = ZombieStates.Wander;
            SensoryDistance = 5;
        }
Exemplo n.º 2
0
        public AIManager(Creature owner) : base(owner)
        {
            rnd    = Randomizer.GetRandomizer();
            states = new Stack <AI_ACTION>();


            sensoryRange = CalculateSensoryRange();
        }
        public override bool CheckProceduralPrecondition(Creature creature)
        {
            Random rnd   = Randomizer.GetRandomizer();
            int    x_pos = rnd.Next(0, creature.manager.worldManager.WorldWidth);
            int    y_pos = rnd.Next(0, creature.manager.worldManager.WorldHeight);

            target = new Point(x_pos, y_pos);
            return(true);
        }
 public CreatureController(Creature owner)
 {
     Owner = owner; rnd = Randomizer.GetRandomizer();
 }
Exemplo n.º 5
0
 public AI_ACTION_DRUNKEN_WALK(AIManager manager)
 {
     rnd        = Randomizer.GetRandomizer();
     this.brain = manager;
     name       = "Random Walker AI";
 }
Exemplo n.º 6
0
 public EffectComponent(Creature owner) : base(owner)
 {
     rnd = Randomizer.GetRandomizer();
 }
        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);
             */
        }