示例#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;
 }