public ALayer2D(World2D world2D, IObject2DFactory layerFactory, ALayer layer) : base(layerFactory) { this.parentFactory = layerFactory; this.ChildrenLayer2D = new List <ALayer2D>(); this.view = new SFML.Graphics.View(); this.defaultViewSize = new Vector2f(-1, -1); this.Position = new Vector2f(0, 0); this.Area = new Vector2i(0, 0); this.objectToObject2Ds = new Dictionary <AEntity, AEntity2D>(); this.object2DToObjects = new Dictionary <AEntity2D, AEntity>(); //this.focusedEntity2Ds = new HashSet<IHitRect>(); this.world2D = new WeakReference <World2D>(world2D); this.zoom = 1; 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; }
public virtual IObject2D CreateObject2D(World2D world2D, ALayer2D layer2D, IObject obj) { return(this.CreateObject2D(world2D, obj)); }
public abstract IObject2D CreateObject2D(World2D world2D, IObject obj);