コード例 #1
0
ファイル: Window.cs プロジェクト: timdetering/Physics2D.Net
 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 PhysicsEngine()
        {
            this.rwLock = new AdvReaderWriterLock();

            this.joints = new List<Joint>();
            this.bodies = new List<Body>();
            this.logics = new List<PhysicsLogic>();

            this.pendingBodies = new List<Body>();
            this.pendingJoints = new List<Joint>();
            this.pendingLogics = new List<PhysicsLogic>();
        }
コード例 #3
0
 public ReaderLock(AdvReaderWriterLock rwLock)
 {
     this.rwLock = rwLock;
     rwLock.EnterRead();
 }
コード例 #4
0
 public ReadOnlyThreadSafeCollection(AdvReaderWriterLock rwLock, List <T> self)
 {
     this.rwLock = rwLock;
     this.self   = self;
 }
コード例 #5
0
 public ReaderLock(AdvReaderWriterLock rwLock)
 {
     this.rwLock = rwLock;
     rwLock.EnterRead();
 }
コード例 #6
0
ファイル: Scene.cs プロジェクト: timdetering/Physics2D.Net
 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>();
 }