예제 #1
0
 public MaskData(float origin, float amplitude, float cycleDistance, float phase, int numPolyEdges, Vector2 axisDir)
 {
     coordinateTypeID   = MaskCoordinateType.Polygonize;
     functionTypeID     = MaskFunctionType.Cos;
     this.origin        = origin; // normalized along length of creature
     this.amplitude     = amplitude;
     this.cycleDistance = cycleDistance;
     this.phase         = phase;
     this.numPolyEdges  = numPolyEdges;
     this.axisDir       = axisDir;
     repeat             = true;
 }
예제 #2
0
 public MaskData(int maxPolyEdges)
 {
     coordinateTypeID = MaskCoordinateType.Polygonize;
     functionTypeID   = MaskFunctionType.Cos;
     origin           = Random.Range(0f, 1f); // normalized along length of creature
     amplitude        = Random.Range(0f, 1f);
     cycleDistance    = Random.Range(0f, 1f);
     phase            = Random.Range(0f, 1f);
     numPolyEdges     = Random.Range(1, maxPolyEdges);
     axisDir          = new Vector2(Random.Range(0f, 1f), Random.Range(0f, 1f));
     repeat           = true;
 }