예제 #1
0
 public Window(Size size)
 {
     this.size      = size;
     this.drawTimer = new PhysicsTimer(GraphicsProcess, .01f);
     this.viewports = new PendableCollection <Window, Viewport>(this);
     this.syncRoot  = new object();
     this.rwLock    = new AdvReaderWriterLock();
 }
예제 #2
0
 public Scene()
 {
     this.syncRoot      = new object();
     this.engine        = new PhysicsEngine();
     this.rwLock        = new AdvReaderWriterLock();
     this.timer         = new PhysicsTimer(Update, .01f);
     this.graphics      = new PendableCollection <Scene, Graphic>(this);
     this.viewports     = new List <Viewport>();
     this.bodies        = new List <Body>();
     this.joints        = new List <Joint>();
     this.physicsLogics = new List <PhysicsLogic>();
 }
예제 #3
0
        protected override void OnAdded(EventArgs e)
        {
            lock (syncRoot)
            {
                this.children = new PendableCollection <Scene, Graphic>(Parent, this);
                foreach (Graphic item in preChildren)
                {
                    item.pendingGraphicParent = this;
                }
                this.children.AddRange(preChildren);
                preChildren.Clear();
            }

            base.OnAdded(e);
        }