Esempio n. 1
0
        public AAILayer(AIWorld world2D, IAIObjectFactory layerFactory, ALayer layer)
            : base(layerFactory)
        {
            this.parentFactory = layerFactory;

            this.objectToObjectAIs = new Dictionary <AEntity, AAIEntity>();
            this.objectAIToObjects = new Dictionary <AAIEntity, AEntity>();

            //this.focusedEntity2Ds = new HashSet<IHitRect>();

            this.worldAI = new WeakReference <AIWorld>(world2D);

            this.pendingGameEvent = new Queue <GameEventContainer>();
            this.gameEventPeriod  = Time.FromSeconds(2);

            this.parentLayer                = layer;
            this.parentLayer.EntityAdded   += OnEntityAdded;
            this.parentLayer.EntityRemoved += OnEntityRemoved;

            this.parentLayer.PositionChanged += OnPositionChanged;
            this.parentLayer.RotationChanged += OnRotationChanged;

            this.parentLayer.EntityPropertyChanged += OnEntityPropertyChanged;

            this.parentLayer.LevelStateChanged += OnLevelStateChanged;
        }
Esempio n. 2
0
 public virtual IAIObject CreateObjectAI(AIWorld worldAI, AAILayer layerAI, IObject obj)
 {
     return(this.CreateObjectAI(worldAI, obj));
 }
Esempio n. 3
0
 public abstract IAIObject CreateObjectAI(AIWorld worldAI, IObject obj);