Exemplo n.º 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;
 }
Exemplo n.º 3
0
        static WallService BuildWalls(Transform[] wallColliders)
        {
            var walls = new WallService(wallColliders.Length);

            foreach (var collider in wallColliders)
            {
                walls.Add(collider);
            }
            return(walls);
        }
Exemplo n.º 4
0
 static WallService BuildWalls(Transform[] wallColliders)
 {
     var walls = new WallService (wallColliders.Length);
     foreach (var collider in wallColliders)
         walls.Add (collider);
     return walls;
 }