private void UpdateCoordString()
        {
            string txt = "";

            //txt += "(";
            txt += _PixelRef.GetIDInSiblings().ToString();

            Pixel parentPx =
                _PixelRef.GetParent();

            while (parentPx != null)
            {
                txt      = "," + txt;
                txt      = parentPx.GetIDInSiblings().ToString() + txt;
                parentPx = parentPx.GetParent();
            }

            //txt += "";
            _Coord = txt;

            string prefix = gameObject.name;

            if (_NamePrefix != "")
            {
                prefix = _NamePrefix;
            }

            if (_bSetGameObjName)
            {
                gameObject.name = prefix + _Coord;
            }
        }
        public override void InitValue(ref Pixel p)
        {
            int          id   = p.GetIDInSiblings();
            List <float> vals = new List <float> ();

            for (int i = 0; i < _InitValues.Count; i++)
            {
                float v = _InitValues[i] + (float)id * _Steps[i];
                vals.Add(v);
            }
            p.SetValues(vals);
        }
Ejemplo n.º 3
0
        public List <int> GetFullPathId()
        {
            List <int> ids = new List <int> ();
            int        id  = GetIDInSiblings();

            ids.Add(id);
            Pixel parentPixel = GetParent();

            while (parentPixel != null)
            {
                id = parentPixel.GetIDInSiblings();
                ids.Add(id);
                parentPixel = parentPixel.GetParent();
            }

            ids.Reverse();
            return(ids);
        }