Ejemplo n.º 1
0
 private void EnsureCorrectGridSize()
 {
     if( numGridsHeight!=vectorField.Height || numGridsWidth!=vectorField.Width )
     {
         vectorField = CreateVectorField();
     }
 }
Ejemplo n.º 2
0
    private VectorField2 CreateVectorField()
    {
        var width = Mathf.Max(1,numGridsWidth);
        var height = Mathf.Max(1,numGridsHeight);

        var vf = new VectorField2( width, height );
        vf.SetAll( initialVelocity );
        return vf;
    }
Ejemplo n.º 3
0
 private void Awake()
 {
     vectorField = CreateVectorField();
 }