Пример #1
0
 public WallCollisionSolver(ComputeShader compute, VelocityService v, PositionService p, WallService w)
 {
     _kernel     = compute.FindKernel(ShaderConst.KERNEL_SOLVE_WALL_COLLISION);
     _compute    = compute;
     _velocities = v;
     _positions  = p;
     _walls      = w;
 }
 public WallCollisionSolver(ComputeShader compute, VelocityService v, PositionService p, WallService w)
 {
     _kernel = compute.FindKernel(ShaderConst.KERNEL_SOLVE_WALL_COLLISION);
     _compute = compute;
     _velocities = v;
     _positions = p;
     _walls = w;
 }
Пример #3
0
        static WallService BuildWalls(Transform[] wallColliders)
        {
            var walls = new WallService(wallColliders.Length);

            foreach (var collider in wallColliders)
            {
                walls.Add(collider);
            }
            return(walls);
        }
Пример #4
0
 static WallService BuildWalls(Transform[] wallColliders)
 {
     var walls = new WallService (wallColliders.Length);
     foreach (var collider in wallColliders)
         walls.Add (collider);
     return walls;
 }