Esempio n. 1
0
        void Init(SurfaceCpsData data)
        {
            var cps = data.GetCps();

            lenX    = cps.GetLength(0);
            lenY    = cps.GetLength(1);
            order   = data.order;
            surface = new Surface(cps, data.order);
        }
Esempio n. 2
0
 void Start()
 {
     surface = new Surface(data.GetCps(), data.order);
     for (int y = 0; y < data.count.y; y++)
     {
         for (int x = 0; x < data.count.x; x++)
         {
             var i = data.Convert(x, y);
             surface.UpdateCP(new Vector2Int(x, y), new CP(transform.position + data.cps[i].pos, data.cps[i].weight));
         }
     }
 }