private void ExplosionCallback(
        VoltRayCast rayCast,
        VoltRayResult rayResult,
        Fix64 rayWeight)
    {
        VoltVector2 point = rayResult.ComputePoint(ref rayCast);

        this.hits.Add(point.ToVector());
    }
Exemple #2
0
 public override VoltShape PrepareShape(VoltWorld world)
 {
     VoltVector2[] vertices = new VoltVector2[this.points.Length];
     for (int i = 0; i < this.points.Length; i++)
     {
         vertices[i] = this.points[i].position.ToFixed();
     }
     this.shape = world.CreatePolygonWorldSpace(
         vertices,
         this.density.ToFixed());
     return(this.shape);
 }
Exemple #3
0
 public static Vector2 ToVector(this VoltVector2 vec)
 {
     return(new Vector2((float)vec.x, (float)vec.y));
 }