Пример #1
0
 void OnEnable()
 {
     _isoObj  = target as IsoObject;
     _nodeX   = _isoObj.nodeX;
     _nodeZ   = _isoObj.nodeZ;
     _spanX   = _isoObj.spanX;
     _spanZ   = _isoObj.spanZ;
     _rotateX = serializedObject.FindProperty("m_isRotated").boolValue;
 }
Пример #2
0
        public override void UpdateFrame()
        {
            if (m_OrderInvalid)
            {
                m_OrderInvalid = false;
                for (int i = 0; i < transform.childCount; ++i)
                {
                    Transform child = transform.GetChild(i);
                    IsoObject obj   = child.GetComponent <IsoObject>();
                    obj.UpdateFrame();

                    Vector3 v = child.localPosition;
                    v.z = -i;
                    child.localPosition = v;
                }
            }
            else
            {
                foreach (IsoObject obj in m_sprites)
                {
                    obj.UpdateFrame();
                }
            }
        }
Пример #3
0
 public void RemoveIsoObject(IsoObject obj)
 {
     m_sprites.Remove(obj);
     Destroy(obj.gameObject);
 }
Пример #4
0
 public void AddIsoObject(IsoObject obj)
 {
     obj.transform.parent = transform;
     m_sprites.Add(obj);
 }