Beispiel #1
0
 public EntityBeliefs Clone(Beliefs beliefs)
 {
     return new EntityBeliefs(beliefs, Entity) {
         LastPos = LastPos,
         LastBlock = LastBlock,
         LastSeen = LastSeen
     };
 }
Beispiel #2
0
        public EntityBeliefs(Beliefs beliefs, Entity ent)
        {
            Beliefs = beliefs;
            Entity = ent;

            Type = ent.HasComponent<Survivor>() ? EntityType.Survivor
                : ent.HasComponent<Zombie>() ? EntityType.Zombie
                : ent.HasComponent<WoodPile>() ? EntityType.PlankPile
                : ent.HasComponent<WoodenBreakable>() ? EntityType.PlankSource
                : EntityType.Other;

            Update();
        }
Beispiel #3
0
 public WallAvoidance(Desires.WallAvoidance desire, Beliefs beliefs)
     : base(desire, beliefs) { }
Beispiel #4
0
        public BlockBeliefs(Beliefs beliefs, Block block)
        {
            Beliefs = beliefs;
            Block = block;
            LastSeen = 0.0;

            _utilityChanged = true;
            _remembered = new HashSet<EntityBeliefs>();

            Update();
        }
Beispiel #5
0
 public ThreatAvoidance(Desires.ThreatAvoidance desire, Beliefs beliefs)
     : base(desire, beliefs)
 {
     _threats = desire.Threats;
 }