Exemplo n.º 1
0
 public MinMaxRange(MinMaxRange range)
 {
     absMin = range.absMin;
     absMax = range.absMax;
     rMin   = range.rMin;
     rMax   = range.rMax;
 }
        private void Arrange()
        {
            if (lastRndHeigth.Equals(rndHeigth))
            {
                return;
            }

            if (arrangeChildren)
            {
                SetArrangablesAsChildren();
            }

            if (arrangeables.Length == 0)
            {
                return;
            }

            for (int i = 0; i < arrangeables.Length; i++)
            {
                Transform a   = arrangeables[i];
                float     y   = rndHeigth.GetValue();
                Vector3   pos = a.localPosition;
                pos.y           = y;
                a.localPosition = pos;
            }
            lastRndHeigth = new MinMaxRange(rndHeigth);
        }
Exemplo n.º 3
0
 public bool Equals(MinMaxRange r)
 {
     return(AreEqual(r.absMax, absMax) && AreEqual(r.absMin, absMin) && AreEqual(r.rMin, rMin) && AreEqual(r.rMax, rMax));
 }