示例#1
0
        public void Initialize(PhysicsSimulator physicsSimulator)
        {
            _gameModel.Initialize(physicsSimulator);
            InitializeBoxViews(physicsSimulator);
            InitializeWater(physicsSimulator);

            CollisionBorder collisionBorder = new CollisionBorder(ConvertUnits.ToSimUnits((float)Width), ConvertUnits.ToSimUnits((float)Height), ConvertUnits.ToSimUnits(100), ConvertUnits.ToSimUnits((float)Width / 2f, (float)Height / 2f));

            collisionBorder.Initialize(physicsSimulator);
        }
示例#2
0
        public void Initialize(PhysicsSimulator physicsSimulator)
        {
            _gameModel.Initialize(physicsSimulator);
            InitializeBoxViews(physicsSimulator);
            InitializeWater(physicsSimulator);

            CollisionBorder collisionBorder = new CollisionBorder(ConvertUnits.ToSimUnits((float) Width),
                                                                  ConvertUnits.ToSimUnits((float) Height),
                                                                  ConvertUnits.ToSimUnits(100),
                                                                  ConvertUnits.ToSimUnits((float) Width/2f,
                                                                                          (float) Height/2f));
            collisionBorder.Initialize(physicsSimulator);
        }